LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.access,microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Range conditional formatting in Excel from Access VBA

Hi !

Using Access XP, I'm generating an Excel worksheet.

I have two questions :

1) If I use the following line to select two non contiguous ranges

With xlsSheet.Range("H3:P36,R3:Y36")
...

I get the error message 1004 : method 'Range' of '_Worksheet' failed.

This is strange because the macro recorder uses the same syntax :
Range("H3:P36,R3:Y36").Select

(I tried the .Select method in Access VBA as well, with the same
result).

What wrong ?


2) Is it possible to apply a conditional formatting to all cells of a
range without :
- having to loop thru each cell ?
- use .FormatConditions, because I have more than 4 conditions
(actually 6)

The formatting I want to set is the bacgroung color only.

Since the file I generate is static (ie: won't be edited later), I
don't need the formatting logic to be dynamic.


Thanks !

FU2: microsoft.public.access


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting in range VLOOKUP fORMULA Excel Discussion (Misc queries) 1 December 17th 09 03:24 PM
How to format range of cells using Conditional Formatting-Excel? bookmanu3 Excel Worksheet Functions 2 June 14th 08 03:39 AM
why can't I access conditional formatting? dennis New Users to Excel 2 March 7th 06 12:25 AM
Conditional Formatting not applied to data exported from Access Mark A Excel Worksheet Functions 5 October 24th 05 12:11 PM
Conditional Formatting Range Dan Excel Programming 3 December 16th 04 03:58 PM


All times are GMT +1. The time now is 08:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"