Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Dallas, Texas, USA
    Posts
    1,680
    Thanks
    0
    Thanked 1 Time in 1 Post

    Adding a Calculator

    I wanted to add a button to my toolbar that when clicked would open a tape calculator that I have at c:/software/showcalc.exe. I used the customize toolbar feature, then commands and added a smiley face to the toolbar. Then modify selection, edit hyperlink, and open. Typed in the path and saved it. Now when I click on the smiley face, I get a warning msg about viruses and asked to confirm! Then my calculator opens. How can I eliminate the warning msg? Better still - how can I attach that feature to a macro button that I could place anywhere on the worksheet? Help??
    - Ricky

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Adding a Calculator

    Hi Ricky,

    Instead of using a hyperlink , you could try the VBA shell command.

    Sub LaunchCalculator
    Calc = Shell ("c:/software/showcalc.exe",1)
    End Sub

    You could then assign that macro to a botton on the sheet.


    Andrew

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Adding a Calculator

    Hi Ricky,
    You can create a simple procedure that will run the program for you:
    Public Sub Calc()
    shell "C:softwareshowcalc.exe", vbnormal focus
    end sub
    You can then assign this macro to a toolbar button or call it from a button on a spreadsheet.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Dallas, Texas, USA
    Posts
    1,680
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Adding a Calculator

    Thanks guys.
    - Ricky

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •