Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding New Workbook created using Macro Recorder


Hi,

Not being familiar with VBA ,I've created a new single sheet Workbook;
copied the data from one worksheet; set column widths to match original
and created the print setup all, using the Macro Recorder.

My question is this, because I used the recorder (I assume) the new
workbook/sheet flickers a lot whilst formatting etc takes place - Is
there a way to hide the new wookbook until the macro has completed?

Thanks in advance,

Dave


--
deelee
------------------------------------------------------------------------
deelee's Profile: http://www.excelforum.com/member.php...o&userid=34866
View this thread: http://www.excelforum.com/showthread...hreadid=555343

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Hiding New Workbook created using Macro Recorder

Dave, you could most likely modify the code that you got from the recorder
and make it run with out the flickers but the easiest way for you may be to
just turn off Screen Updating , like this

Application.ScreenUpdating = False

'*****Your code Here*****

Application.ScreenUpdating = True


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"deelee" wrote in
message ...

Hi,

Not being familiar with VBA ,I've created a new single sheet Workbook;
copied the data from one worksheet; set column widths to match original
and created the print setup all, using the Macro Recorder.

My question is this, because I used the recorder (I assume) the new
workbook/sheet flickers a lot whilst formatting etc takes place - Is
there a way to hide the new wookbook until the macro has completed?

Thanks in advance,

Dave


--
deelee
------------------------------------------------------------------------
deelee's Profile:

http://www.excelforum.com/member.php...o&userid=34866
View this thread: http://www.excelforum.com/showthread...hreadid=555343



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Hiding New Workbook created using Macro Recorder

As ALWAYS, post your code for comments. You need to remove the selections
which should not be necessary.

Here is a recorded macro to copy a worksheet to a new workbook and rename
it.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/25/2006 by Don Guillett
'

'
' Sheets("Sheet2").Select 'NOT needed so removed or commented out
Sheets("Sheet2").Copy
ActiveWorkbook.SaveAs Filename:="C:\yourfoldername\newbook1.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
End Sub




--
Don Guillett
SalesAid Software

"deelee" wrote in
message ...

Hi,

Not being familiar with VBA ,I've created a new single sheet Workbook;
copied the data from one worksheet; set column widths to match original
and created the print setup all, using the Macro Recorder.

My question is this, because I used the recorder (I assume) the new
workbook/sheet flickers a lot whilst formatting etc takes place - Is
there a way to hide the new wookbook until the macro has completed?

Thanks in advance,

Dave


--
deelee
------------------------------------------------------------------------
deelee's Profile:
http://www.excelforum.com/member.php...o&userid=34866
View this thread: http://www.excelforum.com/showthread...hreadid=555343



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding New Workbook created using Macro Recorder


:) Hi Paul and thank you!

That works a treat - although I was very pleased with the outcome of my
macro, my professional pride wouldn't allow me to have a 'flickery'
screen! :)

What an helpful group you all are!

Thanks again,

Dave


--
deelee
------------------------------------------------------------------------
deelee's Profile: http://www.excelforum.com/member.php...o&userid=34866
View this thread: http://www.excelforum.com/showthread...hreadid=555343

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Hiding New Workbook created using Macro Recorder

Your Welcome

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"deelee" wrote in
message ...

:) Hi Paul and thank you!

That works a treat - although I was very pleased with the outcome of my
macro, my professional pride wouldn't allow me to have a 'flickery'
screen! :)

What an helpful group you all are!

Thanks again,

Dave


--
deelee
------------------------------------------------------------------------
deelee's Profile:

http://www.excelforum.com/member.php...o&userid=34866
View this thread: http://www.excelforum.com/showthread...hreadid=555343



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 Created but Not Running in Workbook alexaed Excel Worksheet Functions 9 August 14th 07 08:48 PM
Password protect a workbook created and emailed by a macro? isewdollies Excel Programming 1 June 10th 06 08:46 AM
Macro run each time a new workbook created cmorton89 Excel Discussion (Misc queries) 0 March 8th 06 07:58 PM
Runtime error for macro that works in workbook created in Crystal Excel Discussion (Misc queries) 1 June 22nd 05 08:43 PM
How do I copy macro into new workbook that was created automatica. Darshan Excel Programming 3 January 11th 05 01:24 AM


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