Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Scroll Area | Excel Discussion (Misc queries) | |||
Restrict Scroll Area | Excel Discussion (Misc queries) | |||
How do I restrict any one not to scroll more than 100 row? | Excel Worksheet Functions | |||
Scroll Area | Excel Programming | |||
how to set scroll area | Excel Programming |