Hi
I am creating a membership register for my sister in Queensland (Australia) and I live in Western Australia. All the macros are "recorded" as I'm not smart enough to write them myself. When I send it to her, and connect remotely to her machine it produces the error "Run time error 438 - object doesn't support this property or method". This occurs at the yellowed section of the attached screen shot. The code is:
It is a register showing each year members from 2010 to 2040 and each macro runs a button appropriate for the year. The code merely hides unnecessary columns, sorts the membership data with "X" indicating member/non-member and then prints the sorted result - then returns and unhides the columns.
As I've said - I'm puzzled by this as it works well on my machine. I am running Excel 2019 and she an earlier version - likely 2010. We have enabled macros on her machine. Any help would be greatly appreciated.
I am creating a membership register for my sister in Queensland (Australia) and I live in Western Australia. All the macros are "recorded" as I'm not smart enough to write them myself. When I send it to her, and connect remotely to her machine it produces the error "Run time error 438 - object doesn't support this property or method". This occurs at the yellowed section of the attached screen shot. The code is:
VBA Code:
Sub Rpt_2013()
'
' Rpt_2013 Macro
' Report fin members 2013
'
'
Range("H:H,J:AJ").Select
Range("J1").Activate
Selection.EntireColumn.Hidden = True
Range("A2:I250").Select
ActiveWindow.SmallScroll Down:=-250
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add2 Key:=Range("I3:I250") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add2 Key:=Range("A3:A250") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A2:I250")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Selection.PrintOut Copies:=1, Collate:=True
Columns("G:AK").Select
Range("G2").Activate
Selection.EntireColumn.Hidden = False
Range("A1:G1").Select
Selection.EntireColumn.Hidden = False
End Sub
It is a register showing each year members from 2010 to 2040 and each macro runs a button appropriate for the year. The code merely hides unnecessary columns, sorts the membership data with "X" indicating member/non-member and then prints the sorted result - then returns and unhides the columns.
As I've said - I'm puzzled by this as it works well on my machine. I am running Excel 2019 and she an earlier version - likely 2010. We have enabled macros on her machine. Any help would be greatly appreciated.
Attachments
Last edited by a moderator: