Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell formatting
Hi !!!!!!!!!!!!!!!!!!!!!!!!!!!
I need to do something like sub sTest() dim strTest as string strTest=".interior.colorindex=10" with range("A1") strTest ' basically formatting the range with a variable input end with end sub This is just a dummy code. I need to do this as I have a range which has different formats for different cells within the range. I would like to store the formats in an array and apply it to the range based on the key value or something. Thanks ! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell formatting
You something like this. You can loop through your array instead.
Private Sub CommandButton2_Click() Dim ColorI As Long With Range("A1").Interior For i = 1 To 10 .ColorIndex = i Next End With End Sub NickHK "Shashank" wrote in message ... Hi !!!!!!!!!!!!!!!!!!!!!!!!!!! I need to do something like sub sTest() dim strTest as string strTest=".interior.colorindex=10" with range("A1") strTest ' basically formatting the range with a variable input end with end sub This is just a dummy code. I need to do this as I have a range which has different formats for different cells within the range. I would like to store the formats in an array and apply it to the range based on the key value or something. Thanks ! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional formatting--different formatting depending on cell con | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
expanding custom formatting without removing existing cell formatting? | Excel Worksheet Functions |