Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Adding a Menu Item into a sheet as a button

I'm a VBA beginner trying to pick up some tips quickly to simplify some
company tasks. We have employees enter information into a worksheet
and I'm trying to create a step-by-step procedure that's as dummy-proof
as possible (judging from the mistakes people are making, it's
essential). I'm fine with assigning macros to buttons inserted into a
page, but one thing I can't figure out how to do is add a very basic
menu item to a button that sits within the sheet.

For example, I need for the employees to insert a hyperlink to a
network file into a specific cell (the file name and network location
will change every time). So I want users to push a button in the
spreadsheet that says "Insert Hyperlink," let them browse to the
appropriate file and then have it inserted into the cell. This is the
same result they'd get by placing the cursor in the cell and hitting
Ctrl-K. I can't record the macro without selecting a specific file.

I"m sure this is painfully easy but I can't find anything. Can someone
out there take pity on a VBA newbie?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Adding a Menu Item into a sheet as a button

Try using

application.Dialogs(xlDialogInsertHyperlink).Show

This will add to the active cell.

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I'm a VBA beginner trying to pick up some tips quickly to simplify some
company tasks. We have employees enter information into a worksheet
and I'm trying to create a step-by-step procedure that's as dummy-proof
as possible (judging from the mistakes people are making, it's
essential). I'm fine with assigning macros to buttons inserted into a
page, but one thing I can't figure out how to do is add a very basic
menu item to a button that sits within the sheet.

For example, I need for the employees to insert a hyperlink to a
network file into a specific cell (the file name and network location
will change every time). So I want users to push a button in the
spreadsheet that says "Insert Hyperlink," let them browse to the
appropriate file and then have it inserted into the cell. This is the
same result they'd get by placing the cursor in the cell and hitting
Ctrl-K. I can't record the macro without selecting a specific file.

I"m sure this is painfully easy but I can't find anything. Can someone
out there take pity on a VBA newbie?

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Adding a Menu Item into a sheet as a button

Thanks a million.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Adding a Menu Item into a sheet as a button

Right clicking on the cell and choosing Hyperlink would accomplish the same
and require no maintenance.

Perhaps the real weakness in your company is a poor training program.

--
Regards,
Tom Ogilvy



wrote in message
oups.com...
Thanks a million.



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
Adding a menu item to Excel Uzi Barzilai Excel Discussion (Misc queries) 1 January 14th 08 10:25 AM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
How to add my button or menu item in Excel using VC++ 6.0 Lokesh Sharma[_2_] Excel Programming 1 September 16th 04 03:14 AM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM
Need help with adding a button to sheet Dan B Excel Programming 3 January 16th 04 03:40 AM


All times are GMT +1. The time now is 06:22 AM.

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"