Skip to content

Commit 62f2d81

Browse files
committed
Fixes #1
1 parent f0e5e6b commit 62f2d81

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

XLSX Text Expander/XLSX Text Expander.ahk

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
55
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
66
SetTitleMatchMode, 2
7-
; VERSION 100
7+
; VERSION 110
88

99
; This text expander is a work in progress
1010

@@ -42,7 +42,7 @@ IfMsgBox, OK
4242
}
4343

4444
; Make Excel Visible
45-
XL.Visible := 0
45+
XL.Visible := 1
4646

4747
; select the sheet name containing the templates
4848
tgtSheet := XL.Worksheets("Templates")
@@ -72,10 +72,16 @@ IfMsgBox, OK
7272
}
7373
; tell excel it's save so it wont harass you and close the document
7474
XL.Application.ActiveWorkbook.saved := true
75+
wbCount := XL.Workbooks.Count
7576
if(XL.Workbooks.Count = 1){
7677
XL.Quit
7778
} else {
78-
XL.Application.ActiveWorkbook.Close
79+
for WB in XL.Workbooks {
80+
wbName := WB.Name
81+
if(WB.Name = "hotstrings.xlsx"){
82+
WB.Close
83+
}
84+
}
7985
}
8086

8187
:*:<now::

0 commit comments

Comments
 (0)