Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bill Youngman
 
Posts: n/a
Default Hiding a worksheet while formatting it

I am writing an add-in that takes an Excel workbook that has been exported
from MS Reporting Services and formats it as per client specs when the file
is opened. What I need to be able to do is hide the worksheet and perform
the formatting functions in the background and display the sheet when the
formatting is finished - don't want the user seeing the spreadsheet doing
it's thing right in front of their eyes, they are liable to think that
something is wrong.

I've tried doing

Worksheets(1).Activate

With Worksheets(1)

.Visible = False

(formatting code here)
.Visible = True
End With

Errored out with 'Not able to set Visible property on object'

So I tried inserting a new worksheet making it the visible worksheet and
then formatting the report; but that appears to try and format the new blank
worksheet that I've just created as in

Worksheet.Add

Worksheets(1).Visible = True

Worksheets(2).Activate

With Worksheets(2)
(formatting code)

.Visible = True
End With

.... and then delete worksheet(1).

Any suggestions/ideas are appreciated.

TIA,
Bill Youngman


  #2   Report Post  
 
Posts: n/a
Default

Hi Bill,

Use:
Application.ScreenUpdating = False
When you want the screen to 'freeze', and:
Application.ScreenUpdating = True
to set it back to normal.

Cheers,
JF.

  #3   Report Post  
Bill Youngman
 
Posts: n/a
Default

Thanks JF - that worked like a charm

wrote in message
ups.com...
Hi Bill,

Use:
Application.ScreenUpdating = False
When you want the screen to 'freeze', and:
Application.ScreenUpdating = True
to set it back to normal.

Cheers,
JF.



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 lock worksheet formatting? TANDEX Excel Worksheet Functions 3 May 11th 05 10:22 PM
How to lock worksheet formatting? TANDEX Excel Worksheet Functions 1 May 6th 05 09:36 PM
xls worksheet formatting a single cell Archer------------> Excel Discussion (Misc queries) 1 April 30th 05 07:25 PM
Why color formatting not showing on worksheet? Mary-Lou New Users to Excel 2 March 9th 05 10:17 AM
Formatting a worksheet for data entry DV in Texas Excel Worksheet Functions 2 March 6th 05 07:48 PM


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