View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
infojmac[_11_] infojmac[_11_] is offline
external usenet poster
 
Posts: 1
Default Current Selected Range


Hi,

I'm sure this is so simple - but i cant get my head round it!

All i want is the macro to run on the current selected range (jus
format some cells) but i dont want any message boxes the user jus
highlights the range and then hits the macro key.

Sub FormatCells()

Dim myRange As Range
Set myRange = ActiveCell.Selection (tried ActiveSheet.Selection an
varoius others but to no avail!)

myRange.Interior.Color = vbBlue
'etc

End Sub

Wondered if anyone could provide some help

Thank

--
infojma
-----------------------------------------------------------------------
infojmac's Profile: http://www.excelforum.com/member.php...fo&userid=1078
View this thread: http://www.excelforum.com/showthread.php?threadid=56177