Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activate Userform (run macro?) from cell value
What would be the code for activating a userform from a cell value? I
Cell A2 of worsheet1, it prompts for a date, (formated to Jan-04), I the month of july I need other information in the workbook updated so would like it to open up a userform that queries for all th information needed updating. I have the user form and it works fine just haven't been able to connect it to the cell value change. in essence: if a2 = july-04 then open that userform, else carry-on (unfortunately this code didn't work...) All the help appreciated. ziggy -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activate Userform (run macro?) from cell value
Try this:
Right Click on the worksheet name and select "View Code", then paste the following code. Change the name "UserForm1" if necessary. Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Range("a2"), Target(1)) Is Nothing _ And Target.Count = 1 And Target < "" Then UserForm1.Show End If End Sub -- Regards, Rocky McKinley "ziggyg " wrote in message ... What would be the code for activating a userform from a cell value? In Cell A2 of worsheet1, it prompts for a date, (formated to Jan-04), In the month of july I need other information in the workbook updated so i would like it to open up a userform that queries for all the information needed updating. I have the user form and it works fine, just haven't been able to connect it to the cell value change. in essence: if a2 = july-04 then open that userform, else carry-on (unfortunately this code didn't work...) All the help appreciated. ziggyg --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to activate macro from cell | Excel Discussion (Misc queries) | |||
activate a page of a Multipage in Userform | Excel Discussion (Misc queries) | |||
Password userform activate | Excel Discussion (Misc queries) | |||
activate a cell value through a macro | Excel Discussion (Misc queries) | |||
Userform.Activate | Excel Programming |