Deleting a sheet

  • Thread starter Thread starter P. Dileepan
  • Start date Start date
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
 
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
 
try this:

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

Worksheets("tempSheet").Visible = False



This will not delete the temp worksheet, but you can reuse it
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top