+ Reply to Thread
Results 1 to 6 of 6

Problem Inserting Value Into Cell

  1. #1
    Registered User
    Join Date
    01-17-2024
    Location
    Macomb, Michigan
    MS-Off Ver
    Current
    Posts
    43

    Problem Inserting Value Into Cell

    Below is code that completely works... with the exception of line highligeted in Red. I get a run-time error 1004. I've tried every thing with my very limited VBA knowlege. Help!
    Steve
    Please Login or Register  to view this content.
    Last edited by StevenRK72; 03-09-2024 at 12:41 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,750

    Re: Problem Inserting Value Into Cell

    Can you attach a sample file so we can reproduce the error?

    Is the sheet "elevate pricing" protected?

    Also there is no need to Activate each sheet, although that is not causing your error. I would remove all of those lines. In the one case where you refer to ActiveSheet, refer directly to the sheet of interest rather than using Activate/ActiveSheet.

    Also you have two unqualified Range references that should be explicitly qualified (but that is not causing the runtime error).
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-17-2024
    Location
    Macomb, Michigan
    MS-Off Ver
    Current
    Posts
    43

    Re: Problem Inserting Value Into Cell

    Attache is file I'm using...

    BSB Elevate Quote v4.xlsm

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,750

    Re: Problem Inserting Value Into Cell

    The code in your file is not what you showed in your post. In the file there are illegal "curly" quote marks

    Please Login or Register  to view this content.
    When I fix that it works.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-17-2024
    Location
    Macomb, Michigan
    MS-Off Ver
    Current
    Posts
    43

    Re: Problem Inserting Value Into Cell

    6StringJazzer, Sorry for the run around. While the code appeared to look correct, there must have been some corruption in the line. After you mentioned, I deleted the line and re-typed it in completely...now mine works as well. i will review your first comments to see if I can correct those as well.

    BTW...does your call name indicate guitar? I have 45+ guitars.

    Thansk for your help! Steve

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,750

    Re: Problem Inserting Value Into Cell

    I pointed out the problem with that line of code. Instead of using " " marks it was using the kind of quotes marks you find in Microsoft Word “ ” . These are not recognized by VBA as quotes. I just changed those two characters and it worked for me.



    I am a jazz guitarist. However, I do not have 45 guitars! I have:

    Sadowski Jim Hall
    Eastman AR910-CE
    Hofner New President
    PRS 22 something
    1974 ES-335-TDC
    MIM Telecaster
    Takamine nylon string

+ 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. Problem inserting pagebreak
    By arian29 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-07-2015, 04:05 AM
  2. Problem When Inserting & Deleting a Row
    By timbo1957 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-17-2012, 01:27 PM
  3. Problem with inserting formula in cell with VBA
    By Keva in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-23-2010, 03:43 AM
  4. Help with inserting row problem
    By Stuwally in forum Excel General
    Replies: 3
    Last Post: 01-17-2007, 09:00 PM
  5. little problem with inserting a formula
    By furbiuzzu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-03-2006, 08:10 AM
  6. Problem inserting a column!!!
    By londonchick in forum Excel General
    Replies: 2
    Last Post: 09-05-2005, 09:05 AM
  7. Help: Problem inserting HTML into a single cell
    By M.L. in forum Excel General
    Replies: 0
    Last Post: 07-08-2005, 06:05 PM

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