Create a new Worksheet

  • Thread starter Thread starter Syed Haider Ali
  • Start date Start date
S

Syed Haider Ali

Dear Friends.

How we can create a new temporary worksheet having name "Temp". And
when we close our userform it is deleted automatically.

Thanks

Syed Haider Ali
 
You should be able to incorporate the commands into existing code.

In the code that shows your userform:
Dim TempWS as Worksheet
Set TempWS = ThisWorkbook.Worksheets.Add
TempWs.Name = "Temp"
.... ' Rest of the code that shows the UserForm


Then, when you hide the userform:
TempWS.Delete
.... 'Rest of the code that hides the userform
 

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

Similar Threads

Data Filtering 5
Run Time Error 1004 1
Hyperlink 1
Copy Problem 1
Copy 2
Find the value 4
Arrange a list in ComboBox 1
Display of Record Set 3

Back
Top