Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro attached to button runs twice


My macro runs normally if I run it from VBA editor. If I attache it t
excel buton it runs twice. Does enybody know why ?
(My macro is stored in .xla)

Sub My_Hyperlink1(Directory As String)
Dim My_Adress As String
With Application.FileDialog(msoFileDialogOpen)
.InitialFileName = Directory
.Show
My_Adress = .SelectedItems(1)
End With
ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:=My_Adress
End Sub
Sub test_My_Hyperlink1()
My_Hyperlink1 "C:\"
End Su

--
Joze
-----------------------------------------------------------------------
Jozef's Profile: http://www.excelforum.com/member.php...fo&userid=1602
View this thread: http://www.excelforum.com/showthread.php?threadid=27525

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
macro attached to command button - VBA form Roy Gudgeon[_2_] Excel Discussion (Misc queries) 2 March 16th 10 12:44 PM
Custom Toolbar Button No Longer Runs Assigned Macro Bryan Excel Discussion (Misc queries) 1 April 10th 06 06:02 PM
Control Button is still selected after macro runs Dave[_47_] Excel Programming 1 October 6th 04 09:38 PM
MACRO ATTACHED TO A TOOLBAR BUTTON Joyce[_2_] Excel Programming 0 October 9th 03 07:30 PM
Excel open an existing MS Query in edit mode via macro attached to a button. systems analyst Excel Programming 1 October 3rd 03 12:08 PM


All times are GMT +1. The time now is 07:20 PM.

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

About Us

"It's about Microsoft Excel"