I know the answer to this, but for the life of me I can’t think what it is!
I have a UserForm Initialise Sub which adds a Sheet using …
ACell = ActiveCell.Value
CUser = Application.UserName
SName = ACell & CUser
Sheets.Add.Name = “SName”
… and then does “stuff” with the new Sheet …
I then have a CommandButton Sub to Close the UserForm, but on the way out I want to delete the Sheet created in the first Sub …
But how do I pick up SName from the first Sub to use …
Sheets(“SName”).Delete
???
Thanks …
I have a UserForm Initialise Sub which adds a Sheet using …
ACell = ActiveCell.Value
CUser = Application.UserName
SName = ACell & CUser
Sheets.Add.Name = “SName”
… and then does “stuff” with the new Sheet …
I then have a CommandButton Sub to Close the UserForm, but on the way out I want to delete the Sheet created in the first Sub …
But how do I pick up SName from the first Sub to use …
Sheets(“SName”).Delete
???
Thanks …