PDA

View Full Version : [SOLVED] Getting routines to work together



Aussiebear
07-24-2006, 10:42 PM
Following great help by Steve and Joseph on individual sections I've tried to combined the two but have run into another problem.

The code in the attached file will allow me to double click on a cell in Column C and add an entry to the comments subform, but no longer will allow me to trigger a copy and paste event when I change the value of the last cell in each row from "No" to "Yes".

I am getting a run time error 91 message. "Object variable or With block variable not set" and being triggered by the line starting with "lrow = Sheets("Completed Work").Cells(Rows.Count, 1).End(xlUp).Offset(1).Row

Could someone have a look to see what I've done wrong please.

Ted

Bob Phillips
07-25-2006, 01:22 AM
You have wrongly declared the row variables in the change event, lRow and cRow. They should both b e type Long not type Range.

Aussiebear
07-25-2006, 02:13 AM
Thank you.

Please find attached a working copy of a spreadsheet which could be amended for any type of work history. Special thanks to Lucas(Steve), Malik641(Joseph) and XLD (?) for their assistance in this matter.

Aussiebear(Ted)