Hello,
I have a worksheet with data, where i have cable numbers with all the information how, type, from, to, routing etc.
And i have a sheet with a pulldown to all the cables the of the form fills by vertical searching in the other sheet.
So all information gets produced only have to do this by hand now for all 1887 cable numbers..
What i would like to have is a button which makes a new worksheet, get the next cable number, renames the sheet to this number, and so on.
So 1 sheet per cable.
Best would be 1 click and done for all numbers.
I was wondering if someone could make this work for me.
tried ton of googling but didn't find the answer.
Thanks in advance.
Button i have managed to copy the sheet, but thats all.
Public Sub CopySheetAndRenameByCell2()
Dim wks As Worksheet
Set wks = ActiveSheet
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wks.Range("A1").Value <> "" Then
On Error Resume Next
ActiveSheet.Name = wks.Range("E3").Value
End If
wks.Activate
End Sub
I have a worksheet with data, where i have cable numbers with all the information how, type, from, to, routing etc.
And i have a sheet with a pulldown to all the cables the of the form fills by vertical searching in the other sheet.
So all information gets produced only have to do this by hand now for all 1887 cable numbers..
What i would like to have is a button which makes a new worksheet, get the next cable number, renames the sheet to this number, and so on.
So 1 sheet per cable.
Best would be 1 click and done for all numbers.
I was wondering if someone could make this work for me.
tried ton of googling but didn't find the answer.
Thanks in advance.
Button i have managed to copy the sheet, but thats all.
Public Sub CopySheetAndRenameByCell2()
Dim wks As Worksheet
Set wks = ActiveSheet
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wks.Range("A1").Value <> "" Then
On Error Resume Next
ActiveSheet.Name = wks.Range("E3").Value
End If
wks.Activate
End Sub