daveycrock
New Member
- Joined
- Dec 5, 2014
- Messages
- 2
Hello All!
I am trying to create a blackjack game and have all the pictures of the 52 cards in a deck in a column (1 card per cell). I am trying to insert a certain cell into the image "box" on the userform using VBA code, depending on what the random number comes up as. For example, if the random number = 3, I want the picture in cell A3 (lets say the 3 of hearts) to populate Userform1.Image1 (the image "box" on the userform). How can I do this? Any help would be GREATLY appreciated!!! (I've been stuck for quite a bit now ). I feel like there is an easy way to do this, I just can't figure it out. Thanks everyone!
The reason I can't use the filepath (C:/...) is that this application must be transferable (so I can email the excel file to other people). That is why I'm trying to put each image in a cell on the worksheet and reference the images that way.
I am trying to create a blackjack game and have all the pictures of the 52 cards in a deck in a column (1 card per cell). I am trying to insert a certain cell into the image "box" on the userform using VBA code, depending on what the random number comes up as. For example, if the random number = 3, I want the picture in cell A3 (lets say the 3 of hearts) to populate Userform1.Image1 (the image "box" on the userform). How can I do this? Any help would be GREATLY appreciated!!! (I've been stuck for quite a bit now ). I feel like there is an easy way to do this, I just can't figure it out. Thanks everyone!
The reason I can't use the filepath (C:/...) is that this application must be transferable (so I can email the excel file to other people). That is why I'm trying to put each image in a cell on the worksheet and reference the images that way.