Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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: 'insert new worksheet and copies data to it Range("A1:K24").Select Selection.Cut Sheets.Add ActiveSheet.Paste ActiveSheet.move After:=Sheets("Database") 'column width for data block Columns("A:K").Select Selection.Columns.AutoFit 'name worksheet Dim LkName LkName = Range("B1") ActiveSheet.Name = LkName End Sub Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto Refresh data from original worksheet to newly created copy | Excel Discussion (Misc queries) | |||
using a cell value to name a newly created workbook | Excel Discussion (Misc queries) | |||
Referencing a newly created worksheet | Excel Worksheet Functions | |||
Add list to newly created menu | Excel Discussion (Misc queries) | |||
add list to newly created menu | Excel Worksheet Functions |