Aloha,
I have an Excel file with two sheets of hotel guest reservations. The greater purpose of this Excel file is help me quickly identify reservations that may have more than one room (such as a family traveling together with the same last name but different first name). One sheet has a master guest list of arrivals over the next 30 days and the other sheet has a list of guests that I had previously identified with multiple rooms.
I am having a problem with one small step in the overall program. I am attempting to program the macro to change the font color to red for reservations on the master Guest List that I have previously identified as part of a multiple room reservation.
The two sheets are named "Guest List" and "Already Identified".
I have two variables - AIResNum ("Already Identified Reservation Number") and GLResNum ("Guest List Reservation Number) which are the resevation numbers I am compareing between both sheets. I also have two "line feed" variables "GLRow" and "AIRow".
I basically programmed the macro to loop through and compare if AIResNum and GLResNum are equal and if they are it is supposed to change the font color for the entire row of the matching reservation as appears on the "Guest List" sheet the color red but the macro crashes Excel every time when it finds a match.
I am new at this so I cam imagine there may be a more elegent way to program this loop however, it seems to work all the same except when I set the color for the row to red. I have highlighted the line that seems to crash the macro in red below. I have tried putting in script that deletes such matches and that works effectively, but I really don't want to delete the data -- I just want to change the text color to red. Here is the script:
Mahalo for your help,Please Login or Register to view this content.
Andrew
Bookmarks