ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding New Workbook created using Macro Recorder (https://www.excelbanter.com/excel-programming/365307-hiding-new-workbook-created-using-macro-recorder.html)

deelee[_15_]

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


Paul B

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




Don Guillett

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




deelee[_16_]

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


Paul B

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





All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com