![]() |
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. |
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. |
Adding a Menu Item into a sheet as a button
Thanks a million.
|
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. |
All times are GMT +1. The time now is 01:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com