jochryem
10-19-2017, 06:11 AM
Hello,
I'm trying to find the VBA code used to pass the value in a UserForm textbox to a separate excel application. I need to do this as I have a master workbook that I use to enter in a User ID and Password for an external database then I call multiple workbooks in separate excel applications that run macros asynchronously. When these workbooks open, I need to update the DNS entry so that it doesn't call for the User ID and Password pair again.
I'm opening the separate workbooks as follows:
Private Sub LaunchReport1()
Dim xlApp As Excel.Application
Set xlApp = New Excel.Application
xlApp.Workbooks.Open Filename:= _
"C:\TEST FOLDER\MasterRefreshTest1.xlsm"
xlApp.Visible = True
xlApp.Run "Launcher"
Set xlApp = Nothing
End Sub
Private Sub LaunchReport2()
Dim xlApp As Excel.Application
Set xlApp = New Excel.Application
xlApp.Workbooks.Open Filename:= _
"C:\TEST FOLDER\MasterRefreshTest2.xlsm"
xlApp.Visible = True
xlApp.Run "Launcher"
Set xlApp = Nothing
End Sub
I'm trying to find the VBA code used to pass the value in a UserForm textbox to a separate excel application. I need to do this as I have a master workbook that I use to enter in a User ID and Password for an external database then I call multiple workbooks in separate excel applications that run macros asynchronously. When these workbooks open, I need to update the DNS entry so that it doesn't call for the User ID and Password pair again.
I'm opening the separate workbooks as follows:
Private Sub LaunchReport1()
Dim xlApp As Excel.Application
Set xlApp = New Excel.Application
xlApp.Workbooks.Open Filename:= _
"C:\TEST FOLDER\MasterRefreshTest1.xlsm"
xlApp.Visible = True
xlApp.Run "Launcher"
Set xlApp = Nothing
End Sub
Private Sub LaunchReport2()
Dim xlApp As Excel.Application
Set xlApp = New Excel.Application
xlApp.Workbooks.Open Filename:= _
"C:\TEST FOLDER\MasterRefreshTest2.xlsm"
xlApp.Visible = True
xlApp.Run "Launcher"
Set xlApp = Nothing
End Sub