Consulting

Results 1 to 3 of 3

Thread: Getting routines to work together

  1. #1
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,115
    Location

    Getting routines to work together

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,455
    Location
    You have wrongly declared the row variables in the change event, lRow and cRow. They should both b e type Long not type Range.

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,115
    Location
    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)
    Last edited by Aussiebear; 07-25-2006 at 03:08 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •