![]() |
ThisWorkBook problem
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 |
ThisWorkBook problem
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 |
ThisWorkBook problem
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 |
ThisWorkBook problem
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 ? |
All times are GMT +1. The time now is 05:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com