userform and macro

red95

Board Regular
Joined
Jan 4, 2009
Messages
141
i have a circulation user form saved in a file and i have a main menu user form with a button to run circulation user form but when i run it it put the data on my main menu sheet that is open but i need it on the circulation sheet that is not open any ideal??
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
It sounds like one of the userforms is using unqualified cell references.
Replace syntax like
Range("A1").Value = "x" with
Workbooks("Workbook1.xls").Worksheets("KeySheet").Range("A1").Value = "x"
 
Upvote 0
i am in the menu.xlsm when i use this

Private Sub CommandButton1_Click()

Application.Run "circulation.xlsm!circulation"

End Sub

but it put the data in the menu.xlsm but it needs to go in the circulation.xlsm
 
Upvote 0
The code in the userform is not pointing to circulation.xlsm.
My guess is that it uses unqualified range references, i.e. pointing to the ActiveWorkbook.
The code in the userform has to be changed for it to work properly.
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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