This code will open userform when the cell $A$1 is selected.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A" Then
UserForm1.Show
End If
End Sub
How to insert code:
Open VB Editor by: right clicking on the tab of the sheet you want code in, then select "view code" from drop
Once inside VB Editor Paste the code into the Right Window.
Done !
Note: in the code the "$A" should read "$A$1" for some reason the $1 gets lost when I paste it over as code.
_________________ NOTE: Testing performed on Win2K utilizing Office 2000. Solutions may need tweaking for other versions.<font size=+2><font color="blue"> Adieu,<font color="red">N<font color="blue">imrod</font></font></font> This message was edited by Nimrod on 2002-05-29 09:18 This message was edited by Nimrod on 2002-05-29 09:19
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.