Do you have a larger plan in mind? This does what you are asking, but with
more information, someone could probably come up with something better.
Sub NewSheet()
Dim x As Worksheet
Dim y As Worksheet
Dim z As Variant
Set x = ActiveSheet
Sheets.Add
ActiveSheet.Name = x.Range("A1")
Set y = ActiveSheet
z = Array(x.Range("B2"), x.Range("C3"), x.Range("D4"))
y.Range("X1") = z(0)
y.Range("Y2") = z(1)
y.Range("Z3") = z(2)
End Sub
--
tj
"Anthony" wrote:
thanks for help - I'll give it go,
one other thing, I assume if I want also to paste some text into this newly
created worksheet from the first sheet this can also be done,
ie the new worksheet is created and renamed Bloggs,Joe (as this is entered
into cell A1), and cells B2,C3,D4 and copied from this sheet and pasted into
cells X1,Y2,Z3 of the new worksheet.
thanks again
"tjtjjtjt" wrote:
One way:
Sub NewSheet()
Dim x As Worksheet
Set x = ActiveSheet
Sheets.Add
ActiveSheet.Name = x.Range("A1")
End Sub
--
tj
"Anthony" wrote:
Hi all,
is there a way to copy the name a user inputs (say in cell ref A1) and
create a new worksheet within my current workbook with this 'name' using a
macro ??.
ie
the user inputs Bloggs,Joe into cell ref A1, and once the macro is selected
a new worksheet is created with the 'tab' now changed to Bloggs,Joe - instead
of Sheet1, Sheet2 etc etc
thanks
PSA
I'm a novice -so sorry if this is simple
|