Could not set the RowSource property. Invalid Property Value error when switching between excel files

sathyaganapathi

Board Regular
Joined
Apr 29, 2021
Messages
81
Office Version
  1. 2016
Platform
  1. Windows
Hi,
I am using VBA to store and get the data from Access database using Userforms.
I used drop down and sub dropdown comboboxes for selection of items. 'Select case' option is used for better control of the comboboxs.
The Rowsource data for both comboboxes are from 'name manager' defined in the same excel workbook.
Combobox style is set to dropdowncombo.

The problem is, when I switch between excel workbook and come back to main workbook where userform is running, I get the error while clicking on the listbox line item to select and edit.
The application closes and again we have to start the macro. This happens only when we switch between workbook and come back.
If we continue work with same workbook it works fine.
Please somebody help to get rid of this.
 

Attachments

  • runtimeerror380.jpg
    runtimeerror380.jpg
    28.4 KB · Views: 21
Dear RoryA,
Thanks a lot for your inputs.
Looks fine in the test workbook. Let me apply this to the original file and check with actual use. I will let you know after checking..
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I don't need to see the workbook. You just need to use the same syntax you would in a formula - for example:

'workbook name.xlsm'!Department
Dear RoryA,
It is working fine in the original file too. Thanks a lot for your suggestion..
Have a good day..
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,838
Members
449,193
Latest member
MikeVol

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top