Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This may be simple but I haven't a

Status
Not open for further replies.

tinymind

Programmer
Nov 9, 2000
90
GB
This may be simple but I haven't a clue ..

I have a buton that opens an excel spreadsheet.. simple enough! But the spreadsheet has a password on it I want access to to open the spreadshee and run the macro within the spreadsheet ..

I have got the button to call the spreadshheet open it ...

The spreadsheet macro works when the spreadshett opens ... I just missing the set passwords bit in the middle to get it just right ...

If any one can help .. I will be much in their debt!

Tiny ...

Perfection IS Everything!
 
This code will open a password protected excel workbook..

Private Sub mOpenExcelPassword()
Dim ExcelApp As New Excel.Application

ExcelApp.Workbooks.Open "C:\Test.xls", , , , "password"
ExcelApp.Visible = True

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top