Active Member
May 23, 2020
Hi,
I generated a VBA userform using 365. The code works fine on a PC. However, when I try to share the document with Mac users, I get a run-time error <Run-time error'380' Could not set the RowSource property. Invalid property value.> When I access the document on a Mac, the debugging error comes in the:
Sub Show_For ()
SampleSubmissionForm.()
End Sub
Can someone please help? Thanks in advanced
October 5, 2010
Hi,
In the Reset sub you have this line
iRow = [Counta(SampleList!A:A)] ' identifying the last row
but the sheet name is SampleReport so iRow is being set to 1.
At the bottom of the same sub this has the effect that in your IF, the ELSE is being executed so
.lstList.RowSource = "SampleReport!A3:J65356"
is generating the error. This happened to me on Windows 10, Excel 365 so it's not just a Mac thing.
I don't know why you want to set the RowSource to 65,00+ rows ? But it doesn't like it. Not sure what the max number of rows is in a ListBox, I thought it was around 65,000 but there may be a limit on the number of items (rows x columns) ?
Regards
Phil
Active Member
May 23, 2020
Hi,
Thank you so much for your reply. I am at the very beginning with my excel training so I might need a bit more hand holding. From your reply, I am to decrease the possible row source from 65356 to say 1000? I tried this to no avail. Also a very basic question, I know that Macs don't make use of ActiveX but will Mac users be able to access the template I made-enter/ save data? Although the platforms are different, I thought userforms would accessible on Macs also. Thanks in advanced.
October 5, 2010
Hi,
What this section of code (in Reset) is doing is populating the list in the main section of the form. It's loading rows from the sheet.
If iRow > 1 Then
.lstList.RowSource = "SampleReport!A3:J" & iRow
Else
.lstList.RowSource = "SampleReport!A3:J65356"
End If
If there is no data then I don't know that you need to load anything into the form, you could just have
If iRow > 2 Then
.lstList.RowSource = "SampleReport!A3:J" & iRow
End If
Note that I've changed it to iRow > 2 because your data starts on row 3.
I can't definitively say that Mac users will be able to use what you create. Mac's don' fully support VBA so you may have some calls in there that won't work. Sorry, I do not have a Mac and don't have experience of using VBA on them.
Regards
Phil
1 Guest(s)