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


Q1. How do I disable the screen display when running a macro so that th
screen doesn't flash and jump about? I am using Excel 97 in Window
98.

Q2. The last thing the macro does is prompt for a filename and save th
workbook as that name. Is there any way of saving the workbook withou
saving the macro with it

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Excel macros

Hi SteveMcD,

Q1. How do I disable the screen display when running a macro so that the
screen doesn't flash and jump about? I am using Excel 97 in Windows
98.



Application.Screenupdating=False

And at the end

Application.Screenupdating=True

Q2. The last thing the macro does is prompt for a filename and save the
workbook as that name. Is there any way of saving the workbook without
saving the macro with it?


You could copy the worksheets to a new workbook (which does copy code
behind the sheets though):

Sub test()
Dim oNewbook As Workbook
ActiveWorkbook.Sheets.Copy
Set oNewbook = ActiveWorkbook
oNewbook.SaveAs "c:\data\test.xls"
oNewbook.Close False
Set oNewbook = Nothing
End Sub


Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel macros


Many thanks Jan,

Both your solutions worked perfectly.

Steve


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

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
Excel 2007 macros - how to merge 5 macros together into one Sue Excel Discussion (Misc queries) 1 April 16th 08 08:36 PM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM
Macros not appearing in the Tools Macro Macros list hglamy[_2_] Excel Programming 5 October 24th 03 09:10 AM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM
List the Macros that can be executed from Tools-Macros Rob Bovey Excel Programming 1 July 10th 03 05:34 PM


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