+ Reply to Thread
Results 1 to 4 of 4

Debugging Code Error

  1. #1
    Registered User
    Join Date
    01-06-2008
    Posts
    19

    Debugging Code Error

    Hello Friends:

    I have the following code in the attached sheet.

    Please Login or Register  to view this content.
    The code further helps to reset all cells to white background after these have turned red. When it is time for re-set at the end, I am getting an error on the following line:

    For Each oneCell In rngMatrix.Resize(, rngMatrix.Columns.Count + 1)

    Please help resolve this. The color should change to white for the cells containing numbers. Range is A2:J9, A10:I10.
    Attached Files Attached Files

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Debugging Code Error

    Hi gurpreet161,

    replace
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    01-06-2008
    Posts
    19

    Re: Debugging Code Error

    This works great!

    Quote Originally Posted by pike View Post
    Hi gurpreet161,

    replace
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    I do have one more question. When all cells are red, code currently brings up a prompt box asking "All cells have been chosen. Reset the grid?" with the option of Yes and No. Can you help change this to "Please close the file and reopen" with the option to click just "OK" and not do anything to the file?

    Also, is there a way to disable the save option on the excel file using any code?

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Debugging Code Error

    Hi gurpreet161
    Please Login or Register  to view this content.
    Can you please start a new thread for questions unrelated to the current title

+ 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