+ Reply to Thread
Results 1 to 7 of 7

Changing a Cell Value in a VBA procedure - Where am I going wrong?

  1. #1
    Registered User
    Join Date
    12-26-2016
    Location
    London, England
    MS-Off Ver
    365
    Posts
    79

    Changing a Cell Value in a VBA procedure - Where am I going wrong?

    Hi

    I have what I believed to be a simple piece of code, but CELL "L49" does not change Value when I run the routine.

    Where am I going wrong? - Is it just a 'Schoolboy Error ?'

    Please Login or Register  to view this content.
    Many thanks in anticipation

    Hans302

  2. #2
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Re: Changing a Cell Value in a VBA procedure - Where am I going wrong?

    It works for me.

    But if you were looking to change value in L49 every time the L63 changes, then you have to call it through some sheetchange statement.

    Please Login or Register  to view this content.
    If you think someone helped you, click on the "* Add Reputation" as a way to say thank you.

    If your problem is solved, go to Thread Tools and select Mark This Thread Solved

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Changing a Cell Value in a VBA procedure - Where am I going wrong?

    Is the shape hiding/showing?
    Rory

  4. #4
    Registered User
    Join Date
    12-26-2016
    Location
    London, England
    MS-Off Ver
    365
    Posts
    79

    Re: Changing a Cell Value in a VBA procedure - Where am I going wrong?

    Yes, but I am still having issues getting the Cells to change values - Previous post from Saravnepali does not work for me...

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Changing a Cell Value in a VBA procedure - Where am I going wrong?

    Which module is the code in?

  6. #6
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Re: Changing a Cell Value in a VBA procedure - Where am I going wrong?

    Quote Originally Posted by hans302 View Post
    Yes, but I am still having issues getting the Cells to change values - Previous post from Saravnepali does not work for me...
    Can you attach the workbook

  7. #7
    Registered User
    Join Date
    12-26-2016
    Location
    London, England
    MS-Off Ver
    365
    Posts
    79

    Re: Changing a Cell Value in a VBA procedure - Where am I going wrong?

    I have managed to get the code "Listed_Conditions" working perfectly when it sits independently outside of a WORKSHEET EVENT........

    But the changing cell values part, does not work when it sits inside either a SELECTION CHANGE or WORKSHEET CHANGE EVENT.

    Here is the CODE.....


    Please Login or Register  to view this content.

    ITS DOES NOT LIKE THE CHANGE TO THE CELL VALUES WHEN IT RUNS FROM EITHER OF THESE !!

    Please Login or Register  to view this content.
    Any ideas about the best workaround?

    Regards
    Hans302
    Last edited by hans302; 12-11-2019 at 04:09 PM.

+ 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. Sumifs returns wrong answer when changing from number to cell reference.
    By kolbjornbotten in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-02-2019, 05:29 PM
  2. [SOLVED] Something wrong with this procedure, gives error, please help
    By mantis1117 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2014, 07:24 PM
  3. [SOLVED] Correct procedure results in wrong chart
    By Skakinen in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 01-06-2014, 11:06 AM
  4. Replies: 1
    Last Post: 04-08-2008, 07:40 AM
  5. .OnAction points to wrong file.module.procedure
    By Datasort in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2005, 08:05 PM
  6. What's wrong with my procedure to show tabs?
    By JK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2005, 01:05 AM
  7. [SOLVED] what is right or wrong-Using A Macro To Add Event Procedure To A CommandButton
    By Donna in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2005, 07:58 AM

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