Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
calling sub from other workbook
hi all !
i have the main workbook that must make his calulations, then all other workbooks will copy updated values, so to have total control of the flow.. i need to call the copying macro of the secundary pages, from the main page .. i got this from a friend of the forum..to call the macro in each workbook wich name begins with "_" character for better control.. For Each wb In Workbooks If (left(wb.name,1) )= "_" Then 'Call Mia End if Next wb but it doesn't work , reporting debug problem for each "wb".. this is the workbook where it must be placed, but necessarily after the "call plt" row tx all for attention with my bad grammar !! Public Sub RunTimer() Dim aWB As Workbook Dim aWS As Worksheet Set aWB = ThisWorkbook Set aWS = aWB.Worksheets("Sheet1") With aWS.Range("O8") .Value = .Value + TimeSerial(0, 0, 2) .NumberFormat = "hh:mm:ss" End With nTime = Now + TimeSerial(0, 0, 2) Call plt Application.OnTime nTime, "RunTimer" End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
calling sub from other workbook
Something like this should get you close:
http://www.rondebruin.nl/ado.htm http://www.rondebruin.nl/copy7.htm HTH, Ryan--- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "pls123" wrote: hi all ! i have the main workbook that must make his calulations, then all other workbooks will copy updated values, so to have total control of the flow.. i need to call the copying macro of the secundary pages, from the main page .. i got this from a friend of the forum..to call the macro in each workbook wich name begins with "_" character for better control.. For Each wb In Workbooks If (left(wb.name,1) )= "_" Then 'Call Mia End if Next wb but it doesn't work , reporting debug problem for each "wb".. this is the workbook where it must be placed, but necessarily after the "call plt" row tx all for attention with my bad grammar !! Public Sub RunTimer() Dim aWB As Workbook Dim aWS As Worksheet Set aWB = ThisWorkbook Set aWS = aWB.Worksheets("Sheet1") With aWS.Range("O8") .Value = .Value + TimeSerial(0, 0, 2) .NumberFormat = "hh:mm:ss" End With nTime = Now + TimeSerial(0, 0, 2) Call plt Application.OnTime nTime, "RunTimer" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calling a sub from a different workbook | Excel Programming | |||
Passing calling workbook name to called workbook | Excel Programming | |||
Calling another workbook | Excel Programming | |||
Reference code in another workbook from a calling workbook | Excel Programming | |||
calling sub from another workbook | Excel Programming |