+ Reply to Thread
Results 1 to 4 of 4

VBA, Mistake or Glicth?

  1. #1
    Registered User
    Join Date
    06-21-2013
    Location
    New York, New York
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    2

    Exclamation VBA, Mistake or Glicth?

    Hello All,

    The code below yields run-time error 1004 on the lines for AH15 and AH44, but works fine for AH19 and AH48. The only change to the formulas in AH15 and AH44 was "-R[-5]C[-20]-R[-5]C[-19]-R[-5]C[-11]" replaced "-R[-5]C[-21]-R[-5]C[-12]". The macro uses an input box for the week number and then clears all relevant cells before entering any formulas. I see no reason that my code should break based on the changes I've made. Is there anything in the formatting of the cells or something similar that could cause my code to fail? Otherwise, is this a possible glitch and if so how can I remedy it? I tried re-saving and copying and pasting the data and then pasting in the updated VBA code but neither approach solved the problem.

    Thanks in advance for any and all attempts to help!

    The code:
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 06-21-2013 at 03:05 PM. Reason: Added Code Tags

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: VBA, Mistake or Glicth?

    I changed it to a direct write and it worked fine.
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    06-21-2013
    Location
    New York, New York
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    2

    Re: VBA, Mistake or Glicth?

    This doesn't change anything for me. I still only get the error on the lines I've updated. Other people on different forums have also told me that the current code and the current code with a direct write works for them. What could be different in my file/on my computer that would cause the error?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,509

    Re: VBA, Mistake or Glicth?

    If the formula works for others, the implication is that the issue is data related. Given that we don't have your data, it will be difficult to test.

    Other people on different forums have also told me that the current code and the current code with a direct write works for them
    The implication of this statement is that you need to provide links to all the forums where you have cross posted. Otherwise:

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross post your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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