Forum

Notifications
Clear all

on Mac

5 Posts
3 Users
0 Reactions
145 Views
(@llogballig)
Posts: 4
Active Member
Topic starter
 

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

 
Posted : 02/06/2020 12:33 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

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

 
Posted : 03/06/2020 7:22 am
(@llogballig)
Posts: 4
Active Member
Topic starter
 

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.

 
Posted : 03/06/2020 11:10 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

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

 
Posted : 03/06/2020 6:47 pm
(@debaser)
Posts: 836
Member Moderator
 

As mentioned on other forums where this was posted, you can't use Rowsource for a listbox (or combobox) on a Mac.

 
Posted : 04/06/2020 4:25 am
Share: