View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default workbook as variable

Pete,

Try something like

Dim WB As Workbook
Set WB = ActiveWorkbook
' or
Set WB = Workbooks.Add()


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"pete" wrote in message
...
for a newly created workbook, how can I store a reference to

the
workbook in a variable ,

thanks

pete