ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting a sheet (https://www.excelbanter.com/excel-programming/294812-deleting-sheet.html)

P. Dileepan[_2_]

Deleting a sheet
 
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

Vasant Nanavati

Deleting a sheet
 
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

"P. Dileepan" wrote in message
...
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




crossplatform[_3_]

Deleting a sheet
 
try this:

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

Worksheets("tempSheet").Visible = False



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

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Deleting a sheet
 
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)

"P. Dileepan" wrote in message
...
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





All times are GMT +1. The time now is 09:18 PM.

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