I Experts,
I'm new to Macro and VB.
I'm using a third party application created in EXCEL file where it is pretty much created based on Macro.
I keep getting the below error message when I try to run the updates or access certain features of the EXCEL file.
I have attached the codes below hoping you can find and correct this persisting error.
Private Sub Workbook_BeforeClose(Cance
l As Boolean)
Call ResetExcel
End Sub
Private Sub Workbook_Open()
Call RemoveSysMenu
With Application
.ScreenUpdating = False
.DisplayAlerts = False
.OnKey "{ENTER}", "EnterCode"
.OnKey "~", "EnterCode"
.OnKey "^{a}", "ShortcutPage"
.OnKey "^{b}", "SetupResetS"
.OnKey "^{d}", "LoadDEC"
.OnKey "^{f}", "LoadFIR"
.OnKey "^{i}", "LoadCOM"
.OnKey "^{o}", "LoadREP"
.OnKey "^{p}", "PrintFormShow"
.OnKey "^{r}", "ScreenSetup"
.OnKey "^{t}", "LoadPL3"
.OnKey "^{z}", "DisplayZoomForm"
.OnKey "^{y}", "SaveDecisions"
.OnKey "^{x}", "ExitBSG"
End With
Dim LastProg As String
LastProg = ThisWorkbook.Worksheets("S
tatus").Ra
nge("LastP
rog").Text
'Transfer variables from LastProg
Workbooks("BSG.xls").Works
heets("Sta
tus").Rang
e("BSGPATH
").Value = Workbooks(LastProg).Worksh
eets("Data
").Range("
BSGPATH").
Text
Workbooks("BSG.xls").Works
heets("Sta
tus").Rang
e("UName")
.Value = Workbooks(LastProg).Worksh
eets("Data
").Range("
UName").Te
xt
Workbooks("BSG.xls").Works
heets("Sta
tus").Rang
e("PWord")
.Value = Workbooks(LastProg).Worksh
eets("Data
").Range("
PWNum").Te
xt
Workbooks("BSG.xls").Works
heets("Sta
tus").Rang
e("Downloa
dMethod").
Value = Workbooks(LastProg).Worksh
eets("Data
").Range("
DownloadMe
thod").Val
ue
If LastProg = "OVR.xls" Then
Workbooks("BSG.xls").Works
heets("Sta
tus").Rang
e("Selecte
dProg").Va
lue = Workbooks(LastProg).Worksh
eets("Data
").Range("
SelectedPr
og").Text
End If
'Set LoggedIn value in LastProg to 0 so that logout script won't run when LastProg is closed
Workbooks(LastProg).Worksh
eets("Data
").Range("
LoggedIn")
.Value = 0
Call LoadData
End
End Sub
Private Sub Workbook_SheetBeforeDouble
Click(ByVa
l Sh As Object, ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub
Private Sub Workbook_SheetBeforeRightC
lick(ByVal
Sh As Object, ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub