I am puzzled why the following code returns a compilation error :1025.
I would appreciate any suggestions. Thanks.
The code is as follows:
VBSTART
Option Explicit
Dim handleW1 As Long
Private Declare Function FindWindowA Lib "user32"(ByVal lpClassName As String,ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "user32"(ByVal handleW1 As Long,ByVal handleW1InsertWhere As Long, ByVal w As Long,ByVal x As Long, ByVal y As Long, ByVal z As Long,ByVal wFlags As Long) As Long
Const TOGGLE_HIDEWINDOW = &H80
Const TOGGLE_UNHIDEWINDOW = &H40
Function HideTaskbar()
handleW1 = FindWindowA("Shell_traywnd", "")
Call SetWindowPos(handleW1, 0, 0, 0, 0, 0, TOGGLE_HIDEWINDOW)
End Function
Function UnhideTaskbar()
Call SetWindowPos(handleW1, 0, 0, 0, 0, 0, TOGGLE_UNHIDEWINDOW)
End Function
VBEND
VBEval>HideTaskbar
vb script 1025 error
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
That code is not VBScript. It will not work in Macro Scheduler. VBSTART .. VBEND blocks work only with valid VBScript.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?