+ Reply to Thread
Results 1 to 5 of 5

Help with Range Macro

  1. #1
    Registered User
    Join Date
    10-15-2013
    Location
    Brisbane
    MS-Off Ver
    Excel 2010
    Posts
    7

    Help with Range Macro

    Hi guys,

    Sorry for the simple question but I keep getting an error after I run my macro. Its a simple macro to create folder, save file (.xls and .pdf), increase the invoice number and clear some data.
    I tested the same code ( Example: Range("A1").Value = Range("A1").Value + 1) in a new workbook and it works fine by itself.
    But when I run the one in my invoice template it doesn't work.
    Could you guys help me here....this is the code:

    Please Login or Register  to view this content.
    Cheers

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Help with Range Macro

    Change:

    Please Login or Register  to view this content.
    To:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Help with Range Macro

    hint : text+1 thats not the same as value+1
    you have :
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved , to mark your thread as Solved select Thread Tools and click Mark thread as Solved.

    I can't read the mind of my wife so then I get picture but no sound .... and then I mostly get the idea, same goes here picture your outcome and I get the idea.

  4. #4
    Registered User
    Join Date
    10-15-2013
    Location
    Brisbane
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Help with Range Macro

    Thank you guys
    John: changing it to invoice = Range("G4").Value +1 didnt work
    Hulpeloos: I changed it to
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    but it still not working?
    What should I change it to to make it work? I know its simple but I must be missing something there.
    Cheers
    Last edited by cemartinho; 10-18-2013 at 06:07 PM.

  5. #5
    Registered User
    Join Date
    10-15-2013
    Location
    Brisbane
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Help with Range Macro

    Thank you guys
    John: changing it to invoice = Range("G4").Value +1 didnt work
    Hulpeloos: I changed it to
    Select Code copy to clipboard
    invoice = Sheets("Invoice").Range("G4").Value
    and
    Select Code copy to clipboard
    invoice = Range("G4").Value + 1
    but it still not working?
    What should I change it to to make it work? I know its simple but I must be missing something there.
    Cheers

+ 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. excel 2007 macro need to have variable range of rows rather than fixed range
    By JW1028 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 02:45 PM
  2. [SOLVED] Macro DtRNG as Range, Dt as Range, Multiple Criteria or dates
    By Jack7774 in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 03-18-2013, 03:46 PM
  3. Macro stores Active Sheet range but I need it to find a new range each time it runs
    By jaroesner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2013, 08:00 AM
  4. Replies: 0
    Last Post: 10-23-2012, 01:50 AM
  5. Change range of cells within VBA macro and copy and paste to fixed cell range
    By Mannyny in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2012, 11:51 AM

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