Thread
:
Using arrays to select a series of cells
View Single Post
#
2
Posted to microsoft.public.excel.misc
Dave Peterson
Posts: n/a
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 With Quote