PCDVD數位科技討論區

PCDVD數位科技討論區 (https://www.pcdvd.com.tw/index.php)
-   疑難雜症區 (https://www.pcdvd.com.tw/forumdisplay.php?f=34)
-   -   小弟又出難題來為難大家了,vb如何開啟有密碼保護的excel檔 (https://www.pcdvd.com.tw/showthread.php?t=614467)

=風= 2006-04-24 08:26 PM

小弟又出難題來為難大家了,vb如何開啟有密碼保護的excel檔
 
用vba來寫這個程式小弟會
可是用vb來寫
想了好久還是不知道要如何寫呢?
VB高手有請了
謝謝 :)

sibaken 2006-04-24 08:46 PM

沒有EXCEL,所以只能跟你講應該是利用Shell跟SendKey這兩個指令.

JasonCTW 2006-04-24 09:01 PM

Dim objExcelApp As Excel.Application

Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.Workbooks.Open(Filename As String, [UpdateLinks], [ReadOnly], [Format], [Password], [WriteResPassword], [IgnoreReadOnlyRecommended], [Origin], [Delimiter], [Editable], [Notify], [Converter], [AddToMru])
objExcelApp.Visible = True

=風= 2006-04-24 09:35 PM

引用:
作者JasonCTW
Dim objExcelApp As Excel.Application

Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.Workbooks.Open(Filename As String, [UpdateLinks], [ReadOnly], [Format], [Password], [WriteResPassword], [IgnoreReadOnlyRecommended], [Origin], [Delimiter], [Editable], [Notify], [Converter], [AddToMru])
objExcelApp.Visible = True


感謝! :like:
......


所有的時間均為GMT +8。 現在的時間是12:01 AM.

vBulletin Version 3.0.1
powered_by_vbulletin 2025。