Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How call procedure when worksheet opened?
The following macro call works fine when a specific cell is updated. How do I
call the macro when the worksheet is first opened? Private Sub Worksheet_Activate(ByVal Target As Excel.Range) If Target.Address = Range("hanwono").AddressLocal Then Call PullExistingDataToHand End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How call procedure when worksheet opened?
In the ThisWorkbook module
Private Sub Workbook_Open() ' any conditions you might want PullExistingDataToHand End Sub See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "John" wrote in message ... The following macro call works fine when a specific cell is updated. How do I call the macro when the worksheet is first opened? Private Sub Worksheet_Activate(ByVal Target As Excel.Range) If Target.Address = Range("hanwono").AddressLocal Then Call PullExistingDataToHand End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How call procedure when worksheet opened?
Use the Workbook_Open event, not Activate
-- HTH Bob Phillips (remove nothere from the email address if mailing direct) "John" wrote in message ... The following macro call works fine when a specific cell is updated. How do I call the macro when the worksheet is first opened? Private Sub Worksheet_Activate(ByVal Target As Excel.Range) If Target.Address = Range("hanwono").AddressLocal Then Call PullExistingDataToHand End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How call procedure when worksheet opened?
Tim, I'm pretty new at this VBA stuff, but I think this is almost all I need.
What condition to I check to be sure I'm on the "Hand" sheet to call this procedure? "Tom Ogilvy" wrote: In the ThisWorkbook module Private Sub Workbook_Open() ' any conditions you might want PullExistingDataToHand End Sub See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "John" wrote in message ... The following macro call works fine when a specific cell is updated. How do I call the macro when the worksheet is first opened? Private Sub Worksheet_Activate(ByVal Target As Excel.Range) If Target.Address = Range("hanwono").AddressLocal Then Call PullExistingDataToHand End Sub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How call procedure when worksheet opened?
Private Sub Workbook_Open()
If lcase(ThisWorkbook.Activesheet.Name) = "hand" then PullExistingDataToHand End if End Sub If you only want it to run when you open workbook and the default sheet is named "Hand" -- Regards, Tom Ogilvy "John" wrote in message ... Tim, I'm pretty new at this VBA stuff, but I think this is almost all I need. What condition to I check to be sure I'm on the "Hand" sheet to call this procedure? "Tom Ogilvy" wrote: In the ThisWorkbook module Private Sub Workbook_Open() ' any conditions you might want PullExistingDataToHand End Sub See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "John" wrote in message ... The following macro call works fine when a specific cell is updated. How do I call the macro when the worksheet is first opened? Private Sub Worksheet_Activate(ByVal Target As Excel.Range) If Target.Address = Range("hanwono").AddressLocal Then Call PullExistingDataToHand End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
to call procedure in a worksheet in a module | Excel Discussion (Misc queries) | |||
Call a procedure in the workbook from a worksheet | Excel Programming | |||
Call Procedure | Excel Programming | |||
Where else to look for procedure call | Excel Programming | |||
call procedure | Excel Programming |