+ Reply to Thread
Results 1 to 15 of 15

Syntax error???

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Syntax error???

    Does anyone know what is wrong with the syntax in this statement?

    Please Login or Register  to view this content.
    I keep getting a syntax error on the On Error line as highlighted?

    Thanks
    Johnny
    Last edited by arlu1201; 06-14-2013 at 02:43 PM. Reason: Use code tags in future.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Syntax error???

    you can't split those 3 words up like that:
    Please Login or Register  to view this content.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Syntax error???

    oh right I see now feel really stupid for asking now. Is their anyway that I can extend this from just A1 in range from say A1 to A15?
    Please Login or Register  to view this content.
    Thanks
    Last edited by Burt_100; 06-15-2013 at 07:22 AM.

  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Syntax error???

    Don't feel stupid, this is how we all learn. What exactly are you wanting this to do with this procedure? And please use code tags when displaying code.

  5. #5
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Syntax error???

    If the range is fixed from A1:A15 then
    Please Login or Register  to view this content.
    If the range is dynamic then:
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Syntax error???

    Mordred,
    I have reviewed the situation and dynamic would be best but I need it to start at Column C9 until end of data can the code be modified to support this?
    Many thanks
    Johnny

  7. #7
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Syntax error???

    Yes
    Please Login or Register  to view this content.
    but why did you imply column A then? Nevermind, hopefully this helps you out.

  8. #8
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Syntax error???

    Mordred,
    Sorry, I was just using column A originally for testing purposes. This works but doesn't continue to count down like the earlier example?

  9. #9
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Syntax error???

    Quote Originally Posted by Burt_100 View Post
    Mordred,
    Sorry, I was just using column A originally for testing purposes. This works but doesn't continue to count down like the earlier example?
    When I run this on the mock data set that I made it works according what you have provided. I'm not really sure where it is going wrong for you.

  10. #10
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Syntax error???

    Just to prove my point see the pics:
    Attached Images Attached Images

  11. #11
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Syntax error???

    It works for me as well but I keep having to run the macro it does not work until end is reached the same as before. I have outlined below the complete code:
    Please Login or Register  to view this content.

  12. #12
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Syntax error???

    I'm not sure but try
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Syntax error???

    I have tried that but it still has to be continually run manually to get it to countdown. Any ideas? I have attached a copy of the spreadsheet but cannot get it to work? It also starts at cell C1 how can I modify that so it doesnt affect the headers which are located from cell C1 to C9?
    Thanks
    Johnny
    Attached Files Attached Files

  14. #14
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Syntax error???

    Burt,

    Your 3rd post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code in [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  15. #15
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Syntax error???

    Can anyone help with this? Its most of the way there it just wont run in realtime until 0 secs has been met?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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