Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nope... same error :(
"Norman Jones" wrote: Hi Polandic, Private Sub Workbook_Open() Application.Run ("WorksheetB.xls!SetName('test')") End Sub If the name of the second workbook is WorksheetB.xls, then try: Private Sub Workbook_Open() Application.Run "WorksheetB.xls!SetName", "Test" End Sub --- Regards, Norman "polandjc" wrote in message ... OK this is my most recent attempt: Worksheet A: Private Sub Workbook_Open() Application.Run ("WorksheetB.xls!SetName('test')") End Sub Worksheet B: Pubilc sFileName As String Public Sub SetName(ByVal sName As String) sFileName = sName End Sub Starting the execution in Worksheet A, I get a run time error 1004 (Application-defined or object-defined error). The additional wrinkle to this is that I want Worksheet B to be a protected XLA. Jim "Dave Peterson" wrote: And creating the function in one workbook and running it from the other workbook didn't work? ps. I'm still confused at what's happening. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
setting default filter setting | Charts and Charting in Excel | |||
Setting a datarange | Excel Discussion (Misc queries) | |||
Setting default pivot table field setting to "sum" | Excel Discussion (Misc queries) | |||
VBA Setting .Value to a date does not respect local system setting | Excel Programming | |||
Sending email via macro- setting the importance setting. | Excel Programming |