以市場上office相容軟體(Open Office_Calc )打開檔案後,即可看到程式碼
也就是MS Office Excel 密碼功能對相容軟體(Open Office)是沒有用的
我嘗試打開 獲利指標.xls 看到巨集指令如下
Rem Attribute VBA_ModuleType=VBAModule
Sub Module1
Rem Sub 更新個股資料()
Rem On Error Resume Next
Rem Dim StockNum As String
Rem 0
Rem StockNum = Application.InputBox("請輸入個股代號")
Rem If StockNum <> "" Then
Rem If Asc(StockNum) >= 48 And Asc(StockNum) <= 57 Then GoTo 1 '判定為數字就進行
Rem End If
Rem If StockNum = "False" Then GoTo 2 '若取消則退出
Rem MsgBox ("請輸入個股代號")
Rem GoTo 0
Rem 1
Rem Sheets("IS").Select
Rem With Selection.QueryTable
Rem .Connection = "URL;http://dj.mybank.com.tw/z/zc/zcq/zcqa/zcqa_" & StockNum & ".asp.htm"
Rem .WebSelectionType = xlSpecifiedTables
Rem .WebFormatting = xlWebFormattingNone
Rem .WebTables = "3"
Rem .WebPreFormattedTextToColumns = True
Rem .WebConsecutiveDelimitersAsOne = True
Rem .WebSingleBlockTextImport = False
Rem .WebDisableDateRecognition = False
Rem .WebDisableRedirections = False
Rem .Refresh BackgroundQuery:=False
Rem End With
Rem Selection.QueryTable.Refresh BackgroundQuery:=False
Rem
Rem Sheets("ISQ").Select
Rem With Selection.QueryTable
Rem .Connection = "URL;http://dj.mybank.com.tw/z/zc/zcq/zcq_" & StockNum & ".asp.htm"
Rem .WebSelectionType = xlSpecifiedTables
Rem .WebFormatting = xlWebFormattingNone
Rem .WebTables = "3"
Rem .WebPreFormattedTextToColumns = True
Rem .WebConsecutiveDelimitersAsOne = True
Rem .WebSingleBlockTextImport = False
Rem .WebDisableDateRecognition = False
Rem .WebDisableRedirections = False
Rem .Refresh BackgroundQuery:=False
Rem End With
Rem Selection.QueryTable.Refresh BackgroundQuery:=False
Rem
Rem Sheets("指標圖表").Select
Rem 2
Rem End Sub
Rem
Rem
End Sub作者: sp218882 時間: 2011-10-22 01:14