LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I am soooo sorry

to bother everyone with a very simple question, but I've been trying for
without success

I know how to refer to a specific range like this:

For Each c In ActiveSheet.Range("d2:e14").Cells
c.Value = "Don"
Next

I can refer to a currentRegion too

For Each c In ActiveCell.CurrentRegion.Cells
c.Value = "Don"
Next

What I can't seem to do is apply this to a range of cells selected by the
user

I've tried different variations of ActiveWindow.RangeSelection.Address but
have failed

something like...
set myrange=ActiveWindow.RangeSelection.Address
For Each c In ActiveSheet.Range(myrange).Cells
c.Value = "Don"
Next

My sincerest apology to bother everyone for what should seem like a trivial
task


 
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



All times are GMT +1. The time now is 10:50 AM.

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"