Angela1982
New Member
- Joined
- Oct 16, 2022
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
I am still fairly new to VBA. I have been using S & LRGLOBAL throughout the rest of my Macros and would like to also use it for updating my pivotchart sources. However, I can't get it to update the chart even if I name it "S266", so I think it may be another part of the code that is stopping it from working. Any advice, please?
Sub Pivot_Tables()
'
' Pivot_Tables Macro
'
Sheets("GlobalListings").Select
Dim LRGLOBAL As Long
'For understanding LRGLOBAL = Last Row
LRGLOBAL = Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Leahs Dashboard").Select
Charts(Global_PieChart).SetSourceData Source:=Sheets(GlobalListings).Range("A1:S" & LRGLOBAL)
End Sub
Sub Pivot_Tables()
'
' Pivot_Tables Macro
'
Sheets("GlobalListings").Select
Dim LRGLOBAL As Long
'For understanding LRGLOBAL = Last Row
LRGLOBAL = Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Leahs Dashboard").Select
Charts(Global_PieChart).SetSourceData Source:=Sheets(GlobalListings).Range("A1:S" & LRGLOBAL)
End Sub