LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Stop a workbook from Opening

Hi all

When I run this macro it opens the workbook I've just saved, how can I stop
it from opening after the macro has ran.

Sub SaveOneSheet()
Dim Sht As Worksheet
Const PATH As String = "C:\test\"
Set Sht = ActiveWorkbook.Sheets("Test1")
Sht.Select
Sht.Copy
ActiveWorkbook.SaveAs Filename:= _
PATH & Sht.Range("G1") & ".xls", FileFormat:=xlNormal
End Sub

Thanks in advance

Dave


 
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
Stop Book1 Opening Dobermann Setting up and Configuration of Excel 0 September 2nd 10 10:50 AM
How do I stop blank workbook from opening when opening an existing kjg Excel Discussion (Misc queries) 3 February 12th 10 09:36 PM
stop opening a blank workbook at start up km Excel Discussion (Misc queries) 1 January 18th 06 07:36 PM
How to make the opening of a workbook conditional upon the opening of another workbook Marcello do Guzman Excel Programming 1 December 16th 03 06:09 AM
How to make opening of workbook conditional of opening of another workbook turk5555[_2_] Excel Programming 2 December 15th 03 11:07 PM


All times are GMT +1. The time now is 12:53 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"