How to use a module value in a userform?

whcmelvin

Board Regular
Joined
Jul 27, 2011
Messages
82
In my userform, i already called for the subroutine in Module 3.
But i can seems to print the module 3 value in my userform. they gave me an error "Method or data member not found.
Please help me. Thanks

This is the codes in module 3
Code:
UnPandL = Buy.LotsBuy.Value * 100000 * (Cells(n, 2).Value - Buy.RateBuy.Value)

This the codes in my userform
Code:
Cells(n1, 1).Offset(0, 9).Value = Module3.UnPandL.Value
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
have you tested to see if the variable has data in it? not an error or blank? press F8 and go through the code, hover over the variable after the yellow line and see what value it is
 
Upvote 0
In my userform, i already called for the subroutine in Module 3.
But i can seems to print the module 3 value in my userform. they gave me an error "Method or data member not found.
Please help me. Thanks

This is the codes in module 3
Code:
UnPandL = Buy.LotsBuy.Value * 100000 * (Cells(n, 2).Value - Buy.RateBuy.Value)

This the codes in my userform
Code:
Cells(n1, 1).Offset(0, 9).Value = Module3.UnPandL.Value

How and where is UnPandL declared? At the top of the module, or within a procedure? Dim or Public?

When you type "Module3." does intellisense show UnPandL?
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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