Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to activate macro from cell artzuka Excel Discussion (Misc queries) 2 January 6th 09 09:12 PM
activate a page of a Multipage in Userform Jeff Excel Discussion (Misc queries) 1 February 8th 08 06:16 PM
Password userform activate Moh Excel Discussion (Misc queries) 2 December 14th 07 09:01 AM
activate a cell value through a macro TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 November 10th 05 08:48 AM
Userform.Activate Neil Excel Programming 2 September 15th 03 04:35 PM


All times are GMT +1. The time now is 02:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"