Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range Syntax for Script

I currently have a script that looks like this...............

If ActiveCell.Address(False, False) = "K7" Then OpenCalendar
..
..
..
..
..
..


If ActiveCell.Address(False, False) = "K70" Then OpenCalendar


How do I enter for it to look at the range instead of having to type
a
line for each of the cells in the range?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Range Syntax for Script

Note: you can use this if your range is not one area
If Not Application.Intersect(Range("A1:A20,C1,E1"), Target) Is Nothing Then

See also
http://www.rondebruin.nl/calendar.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


wrote in message oups.com...
I currently have a script that looks like this...............

If ActiveCell.Address(False, False) = "K7" Then OpenCalendar
.
.
.
.
.
.


If ActiveCell.Address(False, False) = "K70" Then OpenCalendar


How do I enter for it to look at the range instead of having to type
a
line for each of the cells in the range?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Range Syntax for Script

This example is for the SelectionChange event
If you use it in a normal macro chnage target to ActiveCell

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" wrote in message ...
Note: you can use this if your range is not one area
If Not Application.Intersect(Range("A1:A20,C1,E1"), Target) Is Nothing Then

See also
http://www.rondebruin.nl/calendar.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


wrote in message oups.com...
I currently have a script that looks like this...............

If ActiveCell.Address(False, False) = "K7" Then OpenCalendar
.
.
.
.
.
.


If ActiveCell.Address(False, False) = "K70" Then OpenCalendar


How do I enter for it to look at the range instead of having to type
a
line for each of the cells in the range?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range Syntax for Script

On Jun 15, 11:46 am, "Ron de Bruin" wrote:
This example is for the SelectionChange event
If you use it in a normal macro chnage target to ActiveCell

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Ron de Bruin" wrote in . ..



Note: you can use this if your range is not one area
If Not Application.Intersect(Range("A1:A20,C1,E1"), Target) Is Nothing Then


See also
http://www.rondebruin.nl/calendar.htm


--


Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


wrote in ooglegroups.com...
I currently have a script that looks like this...............


If ActiveCell.Address(False, False) = "K7" Then OpenCalendar
.
.
.
.
.
.


If ActiveCell.Address(False, False) = "K70" Then OpenCalendar


How do I enter for it to look at the range instead of having to type
a
line for each of the cells in the range?- Hide quoted text -


- Show quoted text -


Great, thanks Ron.

Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjusting the range of a script jsd219 Excel Programming 0 October 31st 06 07:56 PM
VB Script to insert row and calculate a range rlee1999 Excel Programming 3 October 26th 06 01:37 PM
sub script out of range problem AmyTaylor[_20_] Excel Programming 5 July 27th 05 12:17 AM
Script out of range error [email protected] Excel Programming 5 May 24th 05 09:37 PM
Run Time Error 9, Script Out of Range Jeff Marshall[_2_] Excel Programming 1 October 2nd 03 01:50 AM


All times are GMT +1. The time now is 04:56 PM.

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"