Thread: VBA Help file
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
John Coleman John Coleman is offline
external usenet poster
 
Posts: 274
Default VBA Help file

On Mar 25, 12:02 pm, Andy wrote:
Is there any way to bring up the VBA help file without first starting
Excel?

I tried a few things last year, don't remember what I did except that
nothing worked.


Maybe you can use the following vbscript:

'helpfile.vbs

Option Explicit
Dim xlApp, wsh

Set wsh = WScript.CreateObject("WScript.Shell")
Set xlApp = WScript.CreateObject("Excel.Application")
xlApp.WorkBooks.Add
xlApp.Visible = True
xlApp.UserControl = True
WScript.Sleep 100
wsh.SendKeys "%{F11}"
WScript.Sleep 100
wsh.SendKeys "%H"
WScript.Sleep 100
wsh.SendKeys "{F1}"

Set xlApp = Nothing


'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''
Save it in notepad in as (say) vbahelp.vbs on your desktop. If it
doesn't work for you, adjust the sleep lengths. It opens up a copy of
excel while its at it, but that might be good if you are using it as a
learning aid since you can quickly write some test code if need be.

Hope that helps

-John Coleman