declare variables

fenster

Board Regular
Joined
Nov 11, 2002
Messages
98
Hi Guys - This is a vb question , but this forum has always helped me in the past so im gonna post it anyway..

heres my problem..

i will show u the way im trying to do his - one of u can rubbish it and hopefully give me what im looking for....

Ok - I have a label in form 3 , it has a value i want to use in a class module..

lblInvCustomer2.Caption = goRsComplete!jobID (this value)


then i have the code jumping to a class module..


the line in the sql statement of the module reads

sSQL = sSQL & " WHERE (((Transaction.JobID) = '" & JjobID & "'))"

what i want is for the jjobid to equal the value of the label from form 3 .

i know i have to dim but dunno what scope etc.

i keep getting variable not defined and all sorts



any takers?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try it with Public Sub if you have it as Private

Where is the Variable declared? Declare it in the Option Explicit area outside of the Sub might help.
 
Upvote 0

Forum statistics

Threads
1,221,544
Messages
6,160,431
Members
451,646
Latest member
mmix803

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