Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
envir excel in office97, winxphome
hi, from a buttonclickevent in sheet1 i want this to happen: Loop through cells in a columnH in sheet2 Make a copy of sheet3 Rename that copy to a textvalue in current cell in columnH in sheet2 stopping at a value in a cell in sheet2 Could u help me to convert this to vba code? thank You regards Jan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With Worksheets("Sheet2")
for each cell in .Range(.Cells(1,8),.Cells(rows.count,8).End(xlup)) if not isempty(cell) then worksheets("Sheet3").Copy After:=Worksheets(worksheets.count) Activesheet.Name = Cell.Value end if Next End With -- Regards, Tom Ogilvy "Jan Eikeland" wrote in message ... envir excel in office97, winxphome hi, from a buttonclickevent in sheet1 i want this to happen: Loop through cells in a columnH in sheet2 Make a copy of sheet3 Rename that copy to a textvalue in current cell in columnH in sheet2 stopping at a value in a cell in sheet2 Could u help me to convert this to vba code? thank You regards Jan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thank u and mri x-mas
reg Jan "Tom Ogilvy" skrev i melding ... With Worksheets("Sheet2") for each cell in .Range(.Cells(1,8),.Cells(rows.count,8).End(xlup)) if not isempty(cell) then worksheets("Sheet3").Copy After:=Worksheets(worksheets.count) Activesheet.Name = Cell.Value end if Next End With -- Regards, Tom Ogilvy "Jan Eikeland" wrote in message ... envir excel in office97, winxphome hi, from a buttonclickevent in sheet1 i want this to happen: Loop through cells in a columnH in sheet2 Make a copy of sheet3 Rename that copy to a textvalue in current cell in columnH in sheet2 stopping at a value in a cell in sheet2 Could u help me to convert this to vba code? thank You regards Jan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
im getting an error saying function not defined on marked text below : Private Sub CommandButton1_Click() With Worksheets("Elever") For Each Cell In .Range(.Cells(1, 7), .Cells(Rows.Count, 7).End(xlUp)) If Not IsEmpty(Cell) Then Worksheets("Elevmal").Copy After:=Woorksheets(Worksheets.Count) ActiveSheet.Name = Cell.Value End If Next End With End Sub tks reg jan "Jan Eikeland" skrev i melding ... thank u and mri x-mas reg Jan "Tom Ogilvy" skrev i melding ... With Worksheets("Sheet2") for each cell in .Range(.Cells(1,8),.Cells(rows.count,8).End(xlup)) if not isempty(cell) then worksheets("Sheet3").Copy After:=Worksheets(worksheets.count) Activesheet.Name = Cell.Value end if Next End With -- Regards, Tom Ogilvy "Jan Eikeland" wrote in message ... envir excel in office97, winxphome hi, from a buttonclickevent in sheet1 i want this to happen: Loop through cells in a columnH in sheet2 Make a copy of sheet3 Rename that copy to a textvalue in current cell in columnH in sheet2 stopping at a value in a cell in sheet2 Could u help me to convert this to vba code? thank You regards Jan |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is your typo Jan, I wrote Worksheets, you wrote Woorksheets.
-- Regards, Tom Ogilvy "Jan Eikeland" wrote in message ... hi im getting an error saying function not defined on marked text below : Private Sub CommandButton1_Click() With Worksheets("Elever") For Each Cell In .Range(.Cells(1, 7), .Cells(Rows.Count, 7).End(xlUp)) If Not IsEmpty(Cell) Then Worksheets("Elevmal").Copy After:=Woorksheets(Worksheets.Count) ActiveSheet.Name = Cell.Value End If Next End With End Sub tks reg jan "Jan Eikeland" skrev i melding ... thank u and mri x-mas reg Jan "Tom Ogilvy" skrev i melding ... With Worksheets("Sheet2") for each cell in ..Range(.Cells(1,8),.Cells(rows.count,8).End(xlup) ) if not isempty(cell) then worksheets("Sheet3").Copy After:=Worksheets(worksheets.count) Activesheet.Name = Cell.Value end if Next End With -- Regards, Tom Ogilvy "Jan Eikeland" wrote in message ... envir excel in office97, winxphome hi, from a buttonclickevent in sheet1 i want this to happen: Loop through cells in a columnH in sheet2 Make a copy of sheet3 Rename that copy to a textvalue in current cell in columnH in sheet2 stopping at a value in a cell in sheet2 Could u help me to convert this to vba code? thank You regards Jan |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
oops, shame on me,
sorry tks "Tom Ogilvy" skrev i melding ... That is your typo Jan, I wrote Worksheets, you wrote Woorksheets. -- Regards, Tom Ogilvy "Jan Eikeland" wrote in message ... hi im getting an error saying function not defined on marked text below : Private Sub CommandButton1_Click() With Worksheets("Elever") For Each Cell In .Range(.Cells(1, 7), .Cells(Rows.Count, 7).End(xlUp)) If Not IsEmpty(Cell) Then Worksheets("Elevmal").Copy After:=Woorksheets(Worksheets.Count) ActiveSheet.Name = Cell.Value End If Next End With End Sub tks reg jan "Jan Eikeland" skrev i melding ... thank u and mri x-mas reg Jan "Tom Ogilvy" skrev i melding ... With Worksheets("Sheet2") for each cell in .Range(.Cells(1,8),.Cells(rows.count,8).End(xlup)) if not isempty(cell) then worksheets("Sheet3").Copy After:=Worksheets(worksheets.count) Activesheet.Name = Cell.Value end if Next End With -- Regards, Tom Ogilvy "Jan Eikeland" wrote in message ... envir excel in office97, winxphome hi, from a buttonclickevent in sheet1 i want this to happen: Loop through cells in a columnH in sheet2 Make a copy of sheet3 Rename that copy to a textvalue in current cell in columnH in sheet2 stopping at a value in a cell in sheet2 Could u help me to convert this to vba code? thank You regards Jan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Renaming Sheets | Excel Discussion (Misc queries) | |||
Renaming sheets with the same name after copying into a new workbo | Excel Discussion (Misc queries) | |||
Copying and renaming a file | Excel Discussion (Misc queries) | |||
Copying and renaming worksheets | Excel Programming | |||
renaming sheets | Excel Programming |