+ Reply to Thread
Results 1 to 2 of 2

Macro Syntax Error?

  1. #1
    Registered User
    Join Date
    03-12-2014
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Macro Syntax Error?

    This is my macro but there is a syntax error somewhere in the code. This is what I have

    Do

    Range("purchase").Value = InputBox("Enter the purchase value of your bonds between the values of 0 and 1,000,000"

    Loop Until Range("purchase").Value <= 1000000 And Range("purchase").Value >= 0

    I'm trying to write a macro that has purchase price greater than 0 and less than or equal to 1,000,000.

    module1. purchase is my attempt at a macro, go to Visual Basic.

    Any help is appreciated.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    03-12-2014
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Macro Syntax Error?

    here is the code

    [Range("purchase").Value = InputBox("Enter the purchase value of your bonds between the values of 0 and 1,000,000 (do not enter commas)"
    Loop Until Range("purchase").Value <= 1000000 And Range("purchase").Value >= 0]

+ 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 macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  2. [SOLVED] first timer using VB to cut and paste macro - getting compile error syntax error
    By jopedder in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2013, 11:45 AM
  3. basic macro syntax error..
    By ashish1044 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2013, 05:11 AM
  4. Macro Syntax Error
    By zyxw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2013, 04:15 AM
  5. UDF, Subsequent macro syntax error
    By JapanDave in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2012, 08:14 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