Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using arrays to select a series of cells
I'm trying to use a macro called from Worksheet_Activate that selects
cell a1, then runs a macro to resize the cell, then selects a2 ... this continues for 5 or 6 cells I'm having problems selecting the cells, I don't know how to define them. I have so far: Private Sub Worksheet_Activate() Dim i As Integer For i = 1 To 10 ????????? (my macro runs here) next i End Sub Any help is greatly appreciated. Thanks, Rounder |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using arrays to select a series of cells
Does resize mean change the columnwidth or rowheight?
If yes... Option Explicit Private Sub Worksheet_Activate() Dim myCell As Range For Each myCell In Me.Range("a1:a10").Cells myCell.RowHeight = 33 'myCell.ColumnWidth = 12 Next myCell End Sub You don't usually have to select a range/cell to work with it. wrote: I'm trying to use a macro called from Worksheet_Activate that selects cell a1, then runs a macro to resize the cell, then selects a2 ... this continues for 5 or 6 cells I'm having problems selecting the cells, I don't know how to define them. I have so far: Private Sub Worksheet_Activate() Dim i As Integer For i = 1 To 10 ????????? (my macro runs here) next i End Sub Any help is greatly appreciated. Thanks, Rounder -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I autofill a series to reference non adjacent cells? | Excel Discussion (Misc queries) | |||
New - Help - select cells + Free Tutor | Excel Discussion (Misc queries) | |||
Select format cells Custom but Saves As Specil Why. | Excel Worksheet Functions | |||
I cannot select nonadjacent cells in Excell Office XP SP2 | Excel Discussion (Misc queries) | |||
how can i select all the cells with same color on a sheet if there are multipale colors by vba code | Charts and Charting in Excel |