Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Just starting coding VB in Excel. Am more familiar with Access, so I know just enough VB to be dangerous to myself... :-) I have a macro (in PERSONAL.XLS) which is run from within TEST.XLS. In the line of code set basebook = thisworkbook "ThisWorkbook" refers to personal.xls and NOT test.xls. How do I refer to the TEST.XLS ? Many thanks David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Try set basebook = Active.Workbook Regards Andrew b Blogd_Node wrote: Hi, Just starting coding VB in Excel. Am more familiar with Access, so I know just enough VB to be dangerous to myself... :-) I have a macro (in PERSONAL.XLS) which is run from within TEST.XLS. In the line of code set basebook = thisworkbook "ThisWorkbook" refers to personal.xls and NOT test.xls. How do I refer to the TEST.XLS ? Many thanks David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
set basebook = Workbooks("Test.xls")
if it isn't always test.xls but it will be the active workbook set basebook = ActiveWorkbook -- Regards, Tom Ogilvy "Blogd_Node" wrote in message u... Hi, Just starting coding VB in Excel. Am more familiar with Access, so I know just enough VB to be dangerous to myself... :-) I have a macro (in PERSONAL.XLS) which is run from within TEST.XLS. In the line of code set basebook = thisworkbook "ThisWorkbook" refers to personal.xls and NOT test.xls. How do I refer to the TEST.XLS ? Many thanks David |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom / Andrew.
Works fine now! Much appreciated ! =============================== "Tom Ogilvy" wrote in message .. set basebook = Workbooks("Test.xls") if it isn't always test.xls but it will be the active workbook set basebook = ActiveWorkbook "Blogd_Node" wrote in message Hi, Just starting coding VB in Excel. Am more familiar with Access, so I know just enough VB to be dangerous to myself... :-) I have a macro (in PERSONAL.XLS) which is run from within TEST.XLS. In the line of code set basebook = thisworkbook "ThisWorkbook" refers to personal.xls and NOT test.xls. How do I refer to the TEST.XLS ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with ThisWorkbook.RefreshAll | Excel Discussion (Misc queries) | |||
Set Range on ThisWorkBook problem. | Excel Programming | |||
Help with ThisWorkbook | Excel Programming | |||
ThisWorkbook | Excel Programming | |||
Empty ThisWorkbook module, but Macro warning problem | Excel Programming |