VBA learner ITG
Active Member
- Joined
- Apr 18, 2017
- Messages
- 272
- Office Version
- 365
- Platform
- Windows
- MacOS
Thank you for looking at my post.
I was wondering if I could get your advice or guidance to a solution for my VBA issue.
I want to populate column A4 to A23 automatically on a Tab called "Saving Calculator" with the name of the tab or tabs that that the below VBA code creates.
Ideally if A4 was already named from a tab it would look at A5 and populate it with the new tab name and so forth until all blank cells in column A4 to A23.
Sub Copy_paste_tab()
Dim ws As Worksheet
Set wh = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wh.Range("D5").Value <> "" Then
ActiveSheet.Name = wh.Range("D5").Value
End If
wh.Activate
End Sub
I was wondering if I could get your advice or guidance to a solution for my VBA issue.
I want to populate column A4 to A23 automatically on a Tab called "Saving Calculator" with the name of the tab or tabs that that the below VBA code creates.
Ideally if A4 was already named from a tab it would look at A5 and populate it with the new tab name and so forth until all blank cells in column A4 to A23.
Sub Copy_paste_tab()
Dim ws As Worksheet
Set wh = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wh.Range("D5").Value <> "" Then
ActiveSheet.Name = wh.Range("D5").Value
End If
wh.Activate
End Sub