檔案是由 https://forum.gamer.com.tw/C.php?bsn=07650&snA=949872&tnum=13 超便利的Happy Day表格! (# 懶人 #記HD任務 # 動動手指點點點) 這位大大寫的
檔案概觀
http://attach.mobile01.com/attach/201705/mobile01-71d67ec953f1bb78f0e101e04a45d315.png
編輯巨集
http://attach.mobile01.com/attach/201705/mobile01-4072b7502d8eb9febf1869725b89b973.png
gif (我想要的效果)
http://attach.mobile01.com/attach/201705/mobile01-38d9524ad6a6320b4001afb5445757de.gif
此外這裡可以上傳影片和excel檔嗎?我只找到上傳圖片的地方
這是sheet裡那位大大編寫的巨集
Rem Attribute VBA_ModuleType=VBADocumentModule
Option VBASupport 1
Private Sub Worksheet_SelectionChange(ByVal Target As Range) '點擊完成HD任務
Application.EnableEvents = False
If Target.Column = 13 And Target.Row >= 4 And Target.Row <= 100 And Target.Cells.Count = 1 Then
If Cells(Target.Row, 13) = "OK" Then
Cells(Target.Row, 13) = ""
Cells(Target.Row, 12).Select
Else
Cells(Target.Row, 13) = "OK"
Cells(Target.Row, 12).Select
End If
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
'If Not Intersect(Range("J:J"), ActiveCell) Is Nothing Then
If (Target.Column = 10 And Target.Row >= 4 And Target.Row <= 100 And Target.Cells.Count = 1) Or (Target.Column = 11 And Target.Row >= 4 And Target.Row <= 100 And Target.Cells.Count = 1) Then
'下面這句禁止了右鍵選單的跳出,如果希望右鍵選單跳出移除即可。
Cancel = True
Target.Value = Target + 1
'Cells(ActiveCell.Row, 10) = Target + 1
End If
End Sub
++我嘗試過在回報任務那一欄底下的其中一格單獨執行上面selectionchange的巨集
不過會出現
執行 Basic 程序檔 VBAProject.工作表1.Worksheet_SelectionChange 時發生 Scripting Framework 錯誤。
訊息: wrong number of parameters!
沒反應會不會跟這個或者是libreoffice calq不相容有關啊? 對了!我也發現到自己在libreoffice裡的滑鼠屬標是一般的滑鼠樣子,但是在上面的gif裡是十字型,這樣的差異會影響嗎?
先謝謝謝你們!
所以,看起來很可能是 Microsoft Office 和 LibreOffice 這二者之間相容性的問題....
但由於在下沒有使用 LibreOffice ,因此也無法確認這個猜測...^^"
或者您可以先看看下面這二個連結的文章做參考
1. https://help.libreoffice.org/Common/Using_Microsoft_Office_and/zh-TW
2. https://ask.libreoffice.org/en/question/6621/import-ms-word-macros/
上面第2個連結中有提到二個設定敍述,
Option VBASupport 1
Option Compatible
建議或者您可以先試試看在下面二個位置中分別加進這二句再做測試看看先.

司司^^ wrote:
yuehmao大大說的
Option VBASupport 1
Option Compatible
這兩個貼上去後 怎麼沒感覺(? xd
因為
Option VBASupport 1
這一行裡面本身有了,所以我貼了第二行
點出去在點回來時
REM ***** BASIC *****
Sub Main
End Sub
一開始的一大串勒全消失...(恕刪)
是在下疏忽了....
而且想不到會有這樣的結果....反而幫了倒忙^^"
司司^^ wrote:
............
於是試了wps (下載 vba7 for wps )
發現wps在這邊的相容度相較lo高
wps 大大你 實在想不出id 幫了我一個大忙
謝謝你們 ^^
不過,在您自已的努力下,也終於找到方法克服了.


而且,您的表現很有禮貌,另在下很是欣賞~^^




























































































