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

I was wondering if it would be possible to hide the normal excel window
while a macro was running. Thanks

- David

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hide the spreadsheet

Application.Visible = False

or

Sub ABC()
Application.WindowState = xlMinimized
For i = 1 To 10000000
j = j + 1
Next
Application.WindowState = xlNormal
End Sub


if you are doing a lot of selecting just try using
Application.ScreenUpdating = False

Sub MyExistingSub()
Application.Screenupdating = False

' current commands

Application.Screenupdating = True
End Sub

--
Regards,
Tom Ogilvy


"David" wrote in message
ps.com...
I was wondering if it would be possible to hide the normal excel window
while a macro was running. Thanks

- David



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Hide the spreadsheet

Tom, that would be
i = i + 1

This creates a kind of 'Wait' command adjusting the length of time with the
number.

Mike F
"Tom Ogilvy" wrote in message
...
Application.Visible = False

or

Sub ABC()
Application.WindowState = xlMinimized
For i = 1 To 10000000
j = j + 1
Next
Application.WindowState = xlNormal
End Sub


if you are doing a lot of selecting just try using
Application.ScreenUpdating = False

Sub MyExistingSub()
Application.Screenupdating = False

' current commands

Application.Screenupdating = True
End Sub

--
Regards,
Tom Ogilvy


"David" wrote in message
ps.com...
I was wondering if it would be possible to hide the normal excel window
while a macro was running. Thanks

- David





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hide the spreadsheet

No on the correction, i is adjusted by the FOR loop
adding to j was some dummy work - yes, it is just to cause a delay. It was
for demonstration purposes only.

--
Regards,
Tom Ogilvy

"Mike Fogleman" wrote in message
m...
Tom, that would be
i = i + 1

This creates a kind of 'Wait' command adjusting the length of time with
the number.

Mike F
"Tom Ogilvy" wrote in message
...
Application.Visible = False

or

Sub ABC()
Application.WindowState = xlMinimized
For i = 1 To 10000000
j = j + 1
Next
Application.WindowState = xlNormal
End Sub


if you are doing a lot of selecting just try using
Application.ScreenUpdating = False

Sub MyExistingSub()
Application.Screenupdating = False

' current commands

Application.Screenupdating = True
End Sub

--
Regards,
Tom Ogilvy


"David" wrote in message
ps.com...
I was wondering if it would be possible to hide the normal excel window
while a macro was running. Thanks

- David







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Hide the spreadsheet

Thanks Tom that worked great. Also is there any way to run a macro when
excel first starts instead of having to have the user click run.
Thanks.

- David
Tom Ogilvy wrote:
No on the correction, i is adjusted by the FOR loop
adding to j was some dummy work - yes, it is just to cause a delay. It was
for demonstration purposes only.

--
Regards,
Tom Ogilvy

"Mike Fogleman" wrote in message
m...
Tom, that would be
i = i + 1

This creates a kind of 'Wait' command adjusting the length of time with
the number.

Mike F
"Tom Ogilvy" wrote in message
...
Application.Visible = False

or

Sub ABC()
Application.WindowState = xlMinimized
For i = 1 To 10000000
j = j + 1
Next
Application.WindowState = xlNormal
End Sub


if you are doing a lot of selecting just try using
Application.ScreenUpdating = False

Sub MyExistingSub()
Application.Screenupdating = False

' current commands

Application.Screenupdating = True
End Sub

--
Regards,
Tom Ogilvy


"David" wrote in message
ps.com...
I was wondering if it would be possible to hide the normal excel window
while a macro was running. Thanks

- David








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hide the spreadsheet

in the VBE, double click on the Thisworkbook entry in the project explorer
(on the left ) entry for your project. This will bring up the ThisWorkbook
code module. in the left dropdown at the top of the module select Workbook,
in the right dropdown at the top of the module select Open. This will put
in the declaration for the Workbook_Open event which fires when the workbook
is opened.

Private Sub Workbook_Open()

End sub

You can add code here or call your macro

Private Sub Workbook_Open()
MyMacro
End sub

See Chip Pearson's page on events for a general overview
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy


"David" wrote in message
oups.com...
Thanks Tom that worked great. Also is there any way to run a macro when
excel first starts instead of having to have the user click run.
Thanks.

- David
Tom Ogilvy wrote:
No on the correction, i is adjusted by the FOR loop
adding to j was some dummy work - yes, it is just to cause a delay. It
was
for demonstration purposes only.

--
Regards,
Tom Ogilvy

"Mike Fogleman" wrote in message
m...
Tom, that would be
i = i + 1

This creates a kind of 'Wait' command adjusting the length of time
with
the number.

Mike F
"Tom Ogilvy" wrote in message
...
Application.Visible = False

or

Sub ABC()
Application.WindowState = xlMinimized
For i = 1 To 10000000
j = j + 1
Next
Application.WindowState = xlNormal
End Sub


if you are doing a lot of selecting just try using
Application.ScreenUpdating = False

Sub MyExistingSub()
Application.Screenupdating = False

' current commands

Application.Screenupdating = True
End Sub

--
Regards,
Tom Ogilvy


"David" wrote in message
ps.com...
I was wondering if it would be possible to hide the normal excel
window
while a macro was running. Thanks

- David








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Hide the spreadsheet

Thanks Tom.

- David
Tom Ogilvy wrote:
in the VBE, double click on the Thisworkbook entry in the project explorer
(on the left ) entry for your project. This will bring up the ThisWorkbook
code module. in the left dropdown at the top of the module select Workbook,
in the right dropdown at the top of the module select Open. This will put
in the declaration for the Workbook_Open event which fires when the workbook
is opened.

Private Sub Workbook_Open()

End sub

You can add code here or call your macro

Private Sub Workbook_Open()
MyMacro
End sub

See Chip Pearson's page on events for a general overview
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy


"David" wrote in message
oups.com...
Thanks Tom that worked great. Also is there any way to run a macro when
excel first starts instead of having to have the user click run.
Thanks.

- David
Tom Ogilvy wrote:
No on the correction, i is adjusted by the FOR loop
adding to j was some dummy work - yes, it is just to cause a delay. It
was
for demonstration purposes only.

--
Regards,
Tom Ogilvy

"Mike Fogleman" wrote in message
m...
Tom, that would be
i = i + 1

This creates a kind of 'Wait' command adjusting the length of time
with
the number.

Mike F
"Tom Ogilvy" wrote in message
...
Application.Visible = False

or

Sub ABC()
Application.WindowState = xlMinimized
For i = 1 To 10000000
j = j + 1
Next
Application.WindowState = xlNormal
End Sub


if you are doing a lot of selecting just try using
Application.ScreenUpdating = False

Sub MyExistingSub()
Application.Screenupdating = False

' current commands

Application.Screenupdating = True
End Sub

--
Regards,
Tom Ogilvy


"David" wrote in message
ps.com...
I was wondering if it would be possible to hide the normal excel
window
while a macro was running. Thanks

- David







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
How to hide 0.00 on spreadsheet with formula? Tammy4 Excel Worksheet Functions 3 July 10th 09 04:37 PM
hide row on spreadsheet Graham Excel Discussion (Misc queries) 3 June 25th 09 03:10 PM
Want to Hide columns in spreadsheet but NOT hide data in chart. KrispyData Charts and Charting in Excel 1 March 20th 09 04:45 PM
How do I hide a formula so it will not show on the spreadsheet? Brenda Excel Worksheet Functions 1 April 5th 06 02:14 PM
how do you hide the #DIV/0! in a blank spreadsheet? John Gentile Excel Discussion (Misc queries) 2 February 9th 06 10:02 PM


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