From: james on 22 Feb 2010 06:03 Hi Sorry I am not experienced with VB. Could someone please provide a code I can assign to a command button that will open a specific excel spreadsheet that is password protected and input the password on our behalf? Adapting the following would be great Private Sub Command0_Click() On Error GoTo Err_Command0_Click Dim oApp As Object Set oApp = CreateObject("Excel.Application") oApp.Visible = True 'Only XL 97 supports UserControl Property On Error Resume Next oApp.UserControl = True Exit_Command0_Click: Exit Sub Err_Command0_Click: MsgBox Err.Description Resume Exit_Command0_Click End Sub Thanks
|
Pages: 1 Prev: Code correction for changing case Next: Find name of main form |