Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Macro Skip workbook

I have created some vb to open another work book but if it is open it
goes to debug
anyone have a skip if open script

cheers

jack
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Macro Skip workbook

dim wkbk as workbook
on error resume next
set wkbk = workbooks("book1.xls") '<- no drive, no path, just filename
on error goto 0

if wkbk is nothing then
'open it, with drive, path, filename
set wkbk = workbooks.open(filename:="c:\folder\folder\book1.x ls")
end if



wrote:

I have created some vb to open another work book but if it is open it
goes to debug
anyone have a skip if open script

cheers

jack


--

Dave Peterson
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
Macro Skip workbook [email protected] Excel Worksheet Functions 0 February 7th 08 03:54 PM
need help to update macro to office 2007 macro enabled workbook jatman Excel Discussion (Misc queries) 1 December 14th 07 01:57 PM
Quick Macro question - How to delete two rows then skip one - and repeat David Smithz Excel Discussion (Misc queries) 3 March 3rd 06 02:58 PM
Runing a macro in a workbook from another macro in other workbook dhatul Excel Discussion (Misc queries) 0 January 13th 06 06:27 AM
Sheets Skip Macro NICK Excel Discussion (Misc queries) 2 February 11th 05 07:16 AM


All times are GMT +1. The time now is 07:16 AM.

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

About Us

"It's about Microsoft Excel"