+ Reply to Thread
Results 1 to 5 of 5

Macro doesn't run first time but the second time it runs perfect

  1. #1
    Registered User
    Join Date
    04-10-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    76

    Macro doesn't run first time but the second time it runs perfect

    Hi,

    First, thanks for reading my question. Really need your help on this one... I've got a macro that copies all data to a new sheet, creates a button (that's connected to an imported module) and the sheet will be added to an e-mail as an attachment. It's quite basic and simple and in general it works good but.....

    When I use the macro for the first time, it states that the created button in the new sheet isn't connected to macro. If I run the exact macro again (with the same data) it works. What am I doing wrong??? I've pasted below the code and attached an example file. I hope that you can help me guys. really need this one : $

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by flunzy; 12-18-2013 at 07:28 AM.

  2. #2
    Registered User
    Join Date
    04-10-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Macro doesn't run first time but the second time it runs perfect

    Please, someone???? Anyone in the world of VBA who can help me????

  3. #3
    Registered User
    Join Date
    04-10-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Macro doesn't run first time but the second time it runs perfect

    does anyone have a clue?

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Macro doesn't run first time but the second time it runs perfect

    It will be better I think to use a template workbook which contains the code already.

  5. #5
    Registered User
    Join Date
    04-10-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Macro doesn't run first time but the second time it runs perfect

    I didn't think of that yet. I'll keep it mind because I have to figure out how I have to do it.

    Anyone any ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find last row and change it every time macro runs
    By tedy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2013, 08:45 AM
  2. Macro that runs at a certain time based on time in a cell
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-11-2012, 12:37 PM
  3. Macro that effectively runs all the time?
    By jamer02 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-29-2009, 06:07 PM
  4. Macro to move a cell right every time it runs
    By mumford54 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-18-2008, 05:02 AM
  5. String manipulation in macro runs slower each time ran.
    By Lamination Technology in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-16-2006, 02:00 AM

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