Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Switching between workbooks

OK. Fixed it.Had to pu it aside and reread your post again. The
section on a file already open. Works great now. Thanks.

Sub Create()
Dim wb1 As Workbook
Dim wb2 As Workbook
Dim MapType As Variant
Dim MapLineNo As Variant
'Dim HexNumberHigh As Variant
Set wb1 = ActiveWorkbook
On Error Resume Next
Set wb2 = Workbooks("Library.xls")
If wb2 Is Nothing Then
Set wb2 = Workbooks.Open("C:\Library.xls")
End If

Is there a way to close workbook WB2 at the end of a macro?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching between Workbooks Doekoe Excel Discussion (Misc queries) 0 May 5th 08 10:54 AM
Switching between workbooks Jim Excel Discussion (Misc queries) 5 July 28th 07 03:19 AM
Switching Between 2 workbooks using VBA Isit Ears[_2_] Excel Programming 1 October 17th 06 01:33 PM
switching between workbooks... safdarhassan Excel Programming 3 August 12th 06 01:06 PM
Switching Workbooks in vbscript Joe[_3_] Excel Programming 1 August 25th 04 09:09 PM


All times are GMT +1. The time now is 06:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"