Results 1 to 7 of 7

2 macros in one button?

Threaded View

hond 2 macros in one button? 12-11-2012, 06:13 AM
liamsnodden Re: 2 macros in one button? 12-11-2012, 06:31 AM
Trebor76 Re: 2 macros in one button? 12-11-2012, 06:34 AM
rollis13 Re: 2 macros in one button? 12-11-2012, 06:34 AM
Fotis1991 Re: 2 macros in one button? 12-11-2012, 06:34 AM
hond Re: 2 macros in one button? 12-11-2012, 07:15 AM
Fotis1991 Re: 2 macros in one button? 12-11-2012, 07:22 AM
  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    bristol
    MS-Off Ver
    Excel 2007
    Posts
    40

    Question 2 macros in one button?

    Hello,

    Is it possible to assign 2 macros to 1 button? The macros I want to combine are:

    Sub Invoicelog_Button2_Click()

    Dim fname
    fname = "My path " & Format(Now, "dd mmm yy") & ".xls"
    ActiveWorkbook.SaveCopyAs Filename:=fname

    End Sub

    And:

    Sub Invoicelog_Button2_Click()

    Range("K3").Value = Now()

    End Sub

    Now, it gives me an error: Ambigious name detected

    I am new to VBA, can anyone help me?

    Thanks
    Last edited by hond; 12-11-2012 at 07:37 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1