Deleting a sheet

P

P. Dileepan

Hi,

[1] I am adding a temporary worksheet in my code to setup
data and run a regression command. I want this operation
to be NOT visible to the user. How can I hide the
comopuations taking place in a sheet?

[2] After getting all the results I need, I want to
delete the sheet without having to confirm that I do want
to delete the sheet. I don't know how to do this.

Please help.

-- Dileepan
 
V

Vasant Nanavati

Dim ws As Worksheet
With Application
.ScreenUpdating = False
Set ws = Worksheets.Add
'do your computations
'you can also hide the sheet but it may not be necessary
.DisplayAlerts = False
ws.Delete
.DisplayAlerts = True
.ScreenUpdating = True
End With

--

Vasant


ws.Visible = xlSheetHidden
 
C

crossplatform

try this:

Application.ScreenUpdating = False
....
....

Worksheets("tempSheet").Visible = False



This will not delete the temp worksheet, but you can reuse it
 
B

Bob Phillips

To hide the computations, you could never activate the sheet, do the
computations on object variables not selected cells, and then nothing is
shown.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top