Macro for displaying an image based on a string value in a specific cell?

bfigley

New Member
Joined
Mar 2, 2015
Messages
1
Hi guys, this is my first post.

So I've been trying to set up an order form that has drop down menus and vlookup data with a separate sheet for the lookup tables. I want to set up a bunch of macros for each different option so that when a specific option is selected in each of the drop down menus, it displays a different image. Sadly, I am completely new to Visual Basic coding, but I have been looking around online and have a very basic concept of syntax. I was wondering if anyone would be able to shed some light on my conundrum and write a small bit of code that I could copy/paste into each macro for each image that I want to be shown. I know I'm asking a lot, but I'm completely stuck...

Thanks so much in advance! :biggrin:
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Sub Button5_Click()
Dim sheetName As String
sheetName = Range("Q1")
Sheets(sheetName).Visible = True
Sheets(sheetName).Select
End Sub

This kind of macro could make you unhide and open a sheet that has exact name as value of cell Q1.
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top