View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] pfsardella@yahoo.com.nospam is offline
external usenet poster
 
Posts: 172
Default How do I return to newly created worksheet?

Dim wSht as WorkSheet

Set wSht = Sheets.Add(After:=Sheets("Database"))
' Do your manipulation and return to sheet.
wSht .Activate

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
Hello,

I have a workbook with a number of predefined worksheets.
I have a VBA code that formats, manipulates and analyses
data in these worksheets. I create a new worksheet and
copy raw data to it then name the worksheet based on a
value in cell B1. The data is then manipulated. I then
copy a data block from this newly created worksheet to
another prenamed worksheet. My question is how do I get
back to the new worksheet since the name varies. Here is
what I have to create the new worksheet:


Thanks