I'm trying to specify the range of a Pivot Table as the .RowSource of a Userform Listbox. It needs to be represented in R1C1 format. Can anyone tell me how to do that? (Note: the TableRange1 is the range of cells that I really want as input to the listbox)
Here is the code I have so far. (The Pivot table is selected ok but the .RowSource doesn't work)
Dim RngOfPvt As String
Worksheets("Temp Pivots").PivotTables("PivotTable1").TableRange1.Select
MsgBox Application.ConvertFormula(Worksheets("Temp Pivots").PivotTables("PivotTable1").SourceData, xlR1C1, xlA1)
RngOfPvt = Application.ConvertFormula(Worksheets("Temp Pivots").PivotTables("PivotTable1").SourceData, xlR1C1, xlA1)
UserForm1.ListBox1.RowSource = RngOfPvt
UserForm1.Show
Thanks for your help.
Bookmarks