Results 1 to 4 of 4
  1. #1
    mtownend is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    4

    Martin

    Hi ,



    I am tring to use access to open an excel spreadsheet and do some conditional formating but i keep getting an error the code is as follows:



    .Columns("F:F").Select
    .Selection.FormatConditions.Delete
    .Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=or(AND(C1=44,F1>=TIMEVALUE(""09:00:00" ")),AND(C1=43,F1>=TIMEVALUE(""09:00:00"")))"
    .Selection.FormatConditions(1).Interior.ColorIndex = 6

  2. #2
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Is that all of the Code?

    Without seeing all the code it is had to figure out what might be the issue.

    Are you using Late binding?

    It is also important to post the error message

    What is the error message?

  3. #3
    mtownend is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    4

    Martin

    I have figured out why my code hasnt been working i needed to add the references in the addings for microsoft excel object library thanks for your reply.


    Martin

  4. #4
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Martin,

    Thanks for the update.

    Glad you got it figure out.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums