Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I am new here and just started to learn Excel VBA. I've got a few questions. Hope someone could give me a hand. :) 1) how to link a pdf file to a control button in a user form? 2) i found some code to add menu bar in a spreadsheet, but how to add it in a user form? thanks -- Fendic ------------------------------------------------------------------------ Fendic's Profile: http://www.excelforum.com/member.php...o&userid=23959 View this thread: http://www.excelforum.com/showthread...hreadid=375835 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Fendic,
1. the easiest way to launch a different programs file is to use the ShellExecute API call. Declare Function ShellExecute Lib "shell32.dll" Alias _ "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Sub Test() lreturn = ShellExecute(0, vbNullString, _ "E:\My Documents\My Downloads\Redmond Mags\RED_506DG.pdf", _ vbNullString, vbNullString, vbNormalFocus) End Sub 2. notionally you can't. the forms object model doesn't support menus. You can do it in VB, but not VBA. There have been some kludge workarounds, but I wouldn't recommend it unless absolutely crucial to you. Robin Hammond www.enhanceddatasystems.com "Fendic" wrote in message ... Hi, I am new here and just started to learn Excel VBA. I've got a few questions. Hope someone could give me a hand. :) 1) how to link a pdf file to a control button in a user form? 2) i found some code to add menu bar in a spreadsheet, but how to add it in a user form? thanks -- Fendic ------------------------------------------------------------------------ Fendic's Profile: http://www.excelforum.com/member.php...o&userid=23959 View this thread: http://www.excelforum.com/showthread...hreadid=375835 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Robin, I really appreciate your help. The code works, only that I need t declare the function at the top of standard VBA module, which took m an hour to find out. hehe ![]() At this level, I wonder if you or anyone else knows how to turn to certain page when the pdf file opens, or even a certain paragraph line. I know html is able to work like that, and adobe has 'go to... function. but not sure how to fix that in VBA code. Thank you. I found more and more fun in VBA now :) Fendi -- Fendi ----------------------------------------------------------------------- Fendic's Profile: http://www.excelforum.com/member.php...fo&userid=2395 View this thread: http://www.excelforum.com/showthread.php?threadid=37583 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying to get a User Form to activate off a drop down menu | Excel Discussion (Misc queries) | |||
User form in copy of original file | Excel Programming | |||
How to input file name in user form | Excel Programming | |||
vbCode to Link a picture to a user form rather than embed it | Excel Programming | |||
Link to User form | Excel Programming |