ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cell link to userform (https://www.excelbanter.com/excel-programming/416541-cell-link-userform.html)

ranswrt

cell link to userform
 
Is there a way to either click or doubleclick on a cell and have it start a
userform?
Thanks

Graham Whitehead

cell link to userform
 
Put this code into the sheet that you want it to work on.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

If Target.Address = "$A$1" Then frmMe.Show

end sub

Which would then load the userform frmMe when cell A1 is clicked


"ranswrt" wrote in message
...
Is there a way to either click or doubleclick on a cell and have it start
a
userform?
Thanks




ranswrt

cell link to userform
 
Will that work if the cell is locked? I don't want the data to be changed in
the cell.

"Graham Whitehead" wrote:

Put this code into the sheet that you want it to work on.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

If Target.Address = "$A$1" Then frmMe.Show

end sub

Which would then load the userform frmMe when cell A1 is clicked


"ranswrt" wrote in message
...
Is there a way to either click or doubleclick on a cell and have it start
a
userform?
Thanks






All times are GMT +1. The time now is 03:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com