Chris Pfeiffer
asked on
Cell Value to Textbox Control name
I have a the value Sheet9.tbSig.text stored in Cells(2,7)
I have am using
Public LoggedInUser as String
to store the value in Cells(2,7)
I have the following call to open an Outlook e-mail and fill in all fields.
I am using the following all to fill this:
When I use the above call for the variable LoggedInUser it uses "sheet9.tbsig1" and not the value of sheet9.tbsig1.
however when I type in the immediate window LoggedInUser = sheet9.tbsig1 the text of tbsig1 is filled into the call procedure. Any help on how to fix this so the value of the textbox is filled into the call procedure??
Thanks.
I have am using
Public LoggedInUser as String
to store the value in Cells(2,7)
I have the following call to open an Outlook e-mail and fill in all fields.
Public Sub Mail_Export(ByRef mTO As String, ByRef mCC As String, mSubject As String, mBody As String)
I am using the following all to fill this:
Call OutlookEmail.Mail_Export(cboAssignedTo.Value, Sheet9.tbEPRUpdateCC, "(FOUO) " & cboMember.Text & " EPR Update(FOUO)", Sheet9.tbFOUO.Text & vbCrLf & vbCrLf & Sheet9.tbEPRUpdateBody.Text & vbCrLf & vbCrLf & _
LoggedInUser & vbCrLf & vbCrLf & Sheet9.tbFOUO.Text)
When I use the above call for the variable LoggedInUser it uses "sheet9.tbsig1" and not the value of sheet9.tbsig1.
however when I type in the immediate window LoggedInUser = sheet9.tbsig1 the text of tbsig1 is filled into the call procedure. Any help on how to fix this so the value of the textbox is filled into the call procedure??
Thanks.
ASKER
LoggedInUser = Cells(UserIndex, 6)
Hi,
in your question you say it comes from Cells(2,7)
not Cells(something,6)
is that the problem?
Regards
in your question you say it comes from Cells(2,7)
not Cells(something,6)
is that the problem?
Regards
ASKER
No sorry I was just typing it from memory. it is Cells(UserIndex,7)
UserIndex is just a placeholder for the row of the currently logged in user.
UserIndex is just a placeholder for the row of the currently logged in user.
which result gives this just before the call sub
Debug.Print TypeName(LoggedInUser)
Debug.Print TypeName(LoggedInUser)
ASKER
String
When you type LoggedInUser = sheet9.tbsig1 in the immediate window you assign a textbox
to the variable not a string
then when you Mail_Export sub uses it calls the default propertiy of the object which is in this case .Value
I suppose you have in Cells(UserIndex, 7) the string "sheet9.tbsig1" that won't work
Regards
to the variable not a string
then when you Mail_Export sub uses it calls the default propertiy of the object which is in this case .Value
I suppose you have in Cells(UserIndex, 7) the string "sheet9.tbsig1" that won't work
Regards
ASKER
I understand. I just wanted to know if there was any way to pass the string to a textbox like when I type it into the immediate window?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the fast response.
Could you show where you assign the value of LoggedInUser in the code
Regards