This is my userform code:
I am trying to carry the "myUserName" and "myPassword" over to a sheet that's running an Essbase pull. I tried using the following in place of "myUserName = Me.txtUN.Value, myPassword = Me.txtPW.Value" but it does not allow this argument.
Is there any way to define one of these inputs as "myUsername" in my worksheet which is defined
and used in this process
Code:
Public Sub cmdOK_Click()
Dim myUserName As Variant
Dim myPassword As Variant
Dim WB As Workbook
Dim WS As Worksheet
Set WB = ThisWorkbook
Set WS = Worksheets("Essbase TCP")
If frmEssb.txtUN.Value = "" Then
frmEssb.txtUN.SetFocus
MsgBox "Please enter your Username"
End If
If frmEssb.txtPW.Value = "" Then
frmEssb.txtPW.SetFocus
MsgBox "Please enter your Password"
End If
myUserName = Me.txtUN.Value
myPassword = Me.txtPW.Value
Unload Me
End Sub
I am trying to carry the "myUserName" and "myPassword" over to a sheet that's running an Essbase pull. I tried using the following in place of "myUserName = Me.txtUN.Value, myPassword = Me.txtPW.Value" but it does not allow this argument.
Code:
WS("myUserName") = Me.txtUN.Value
WS("myPassword") = Me.txtPW.Value
Is there any way to define one of these inputs as "myUsername" in my worksheet which is defined
Code:
Dim myUsername AsVariant
Code:
x = EssVConnect(mySheetname, myUserName, myPassword, myServer, myApp, myDB)