Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default link to pdf file & menu bar in user form


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default link to pdf file & menu bar in user form

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default link to pdf file & menu bar in user form


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to get a User Form to activate off a drop down menu Rcarper Excel Discussion (Misc queries) 2 October 2nd 09 02:04 PM
User form in copy of original file Jennifer Excel Programming 3 April 17th 05 05:56 PM
How to input file name in user form Boris Pelakh Excel Programming 1 November 7th 04 07:56 PM
vbCode to Link a picture to a user form rather than embed it novicevbaer[_8_] Excel Programming 0 August 26th 04 09:07 PM
Link to User form gregork Excel Programming 2 January 31st 04 11:36 AM


All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"