Cell Selection show userforms

buzz71023

Active Member
Joined
May 29, 2011
Messages
295
Office Version
  1. 2016
Platform
  1. Windows
Need some help here.
I have a spreadsheet with about 400 different editable cells. About 50 of those cells have a different Userform to insert that cell' data.
I would like to be able to select the cell and have the corresponding Userform show.
For example is "B6" was selected it would show a different for than if "G17" was selected.

I'm sure this is accomplished by the Worksheet SelectionChange function but I am lost.

Any and all ideas are welcome on how to accomplish this, right now I just have a transparent square over the cells with a Macro attached to bring up the Userforms.

Thanks in advance.
BT
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
The SelectionChange event is triggered when you click on a cell. I'm not sure what the purpose of the transparent squares is. I don't think you need them. The easiest way I can think of is to have the userform name in each cell. When you click any cell, the userform whose name is in that cell would be opened. Would that work for you?
 
Upvote 0
Sorry, yes I am aware of when the SelectionChange is triggered but wouldn't your way display the name of the form in cell instead of the data entered?
The sheet is printed out so the Userform name would appear instead of the data correct?

FYI the transparent square is serving as a selectable/clickable object to initiate a macro. Same exact function as a button except it is transparent so I can place it directly over the cell and still see the data behind it.
 
Upvote 0
If you use the square to trigger the macro, then the SelectionChange event won't work. You will need to assign a macro to each square meaning you would need 50 macros. You could do away with the squares and click on the cell instead. In this manner, you can use the SelectionChange event but you would still need to assign a macro to each cell. Perhaps you could upload a copy of your file which includes any macros and userforms you are currently using, to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Include a detailed explanation of what you would like to do using a few examples from your data and referring to specific cells, rows, columns and worksheets. If the workbook contains confidential information, you could replace it with generic data. Maybe by looking at you file, we could check if there is an alternative to using the 50 macros.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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