Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default How to restrict scroll area

"CyberBuzzard" wrote:
Then I tried this:

<snip

That almost would have worked--if you had used the .Address property of the
Range objects rather than the .Text property. .Text gives you the contents
of the cells. The other problem was that you don't need to put quotes on
strings you're constructing, unless you want the quote as part of the string.
You didn't want to do that here. When you're manually entering an A1-style
address, you need the quotes to tell the VB interpreter "this is a string,
don't interpret it as a variable name." When you pass an address in a String
variable, the interpreter won't evaluate the String further.

C2 = "A1"
Range(C2).Select

You'll be surprised which cell that will select if you don't read carefully.


In any case, do as Tom suggests and use the ranges themselves. So long as
you've figured out which cells to name Msg1 and Msg2, you could say:

Worksheets(1).ScrollArea = Range("Msg1", "Msg2").Address

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
Scroll Area Paul Dusterhoft Excel Discussion (Misc queries) 8 September 21st 05 11:36 AM
Restrict Scroll Area anuradha Excel Discussion (Misc queries) 0 July 20th 05 07:37 AM
How do I restrict any one not to scroll more than 100 row? Saadi Excel Worksheet Functions 1 January 7th 05 07:25 PM
Scroll Area Ashman Excel Programming 3 September 18th 04 04:23 PM
how to set scroll area David W[_3_] Excel Programming 1 August 26th 03 04:56 PM


All times are GMT +1. The time now is 07:07 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"