Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Scroll Area Problem

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Scroll Area Problem

The scroll area setting does not save when the workbook is closed. You have
to set it manually with the workbook_open event.


--
JNW


"Tim Davies" wrote:

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Scroll Area Problem

Thanks, How would I go about doing that?

"Tim Davies" wrote:

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim

  #4   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Scroll Area Problem

In ThisWorkbook paste the following:
Private Sub Workbook_Open()
Sheets("mysheet").ScrollArea = "A1:D10"
End Sub

Make sure to change the sheet name and range. You can repeat the line for
all the sheets you want to limit.
--
JNW


"Tim Davies" wrote:

Thanks, How would I go about doing that?

"Tim Davies" wrote:

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Scroll Area Problem

Where do I need the "'s and, should I use the Name of the sheet or the (name)
of the sheet?

"JNW" wrote:

In ThisWorkbook paste the following:
Private Sub Workbook_Open()
Sheets("mysheet").ScrollArea = "A1:D10"
End Sub

Make sure to change the sheet name and range. You can repeat the line for
all the sheets you want to limit.
--
JNW


"Tim Davies" wrote:

Thanks, How would I go about doing that?

"Tim Davies" wrote:

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim



  #6   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Scroll Area Problem

I always use the sheet name that appears in excel on the sheet tab. Doing
this you need to use the quotation marks. If you refer to the sheet number
as provided by VBA you do not need the quote marks.
--
JNW


"Tim Davies" wrote:

Where do I need the "'s and, should I use the Name of the sheet or the (name)
of the sheet?

"JNW" wrote:

In ThisWorkbook paste the following:
Private Sub Workbook_Open()
Sheets("mysheet").ScrollArea = "A1:D10"
End Sub

Make sure to change the sheet name and range. You can repeat the line for
all the sheets you want to limit.
--
JNW


"Tim Davies" wrote:

Thanks, How would I go about doing that?

"Tim Davies" wrote:

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Scroll Area Problem

I have got this code in the branch "microsoft excel projects", then "Sheet2
(Room Sessions):
Private Sub Workbook_Open()
Sheets("Room Sessions").ScrollArea = A1: AA72
End Sub

Yet this still does not help.

"JNW" wrote:

I always use the sheet name that appears in excel on the sheet tab. Doing
this you need to use the quotation marks. If you refer to the sheet number
as provided by VBA you do not need the quote marks.
--
JNW


"Tim Davies" wrote:

Where do I need the "'s and, should I use the Name of the sheet or the (name)
of the sheet?

"JNW" wrote:

In ThisWorkbook paste the following:
Private Sub Workbook_Open()
Sheets("mysheet").ScrollArea = "A1:D10"
End Sub

Make sure to change the sheet name and range. You can repeat the line for
all the sheets you want to limit.
--
JNW


"Tim Davies" wrote:

Thanks, How would I go about doing that?

"Tim Davies" wrote:

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim

  #8   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Scroll Area Problem

It can't be in the sheets code. It has to be in the "ThisWorkbook" code.
Also, you need quotes around the area listed as the scroll area. Also remove
the space after the colon.

In VBA, unless something is defined in VBA itself (not even excel) or a
number it must have quotes around it.
--
JNW


"Tim Davies" wrote:

I have got this code in the branch "microsoft excel projects", then "Sheet2
(Room Sessions):
Private Sub Workbook_Open()
Sheets("Room Sessions").ScrollArea = A1: AA72
End Sub

Yet this still does not help.

"JNW" wrote:

I always use the sheet name that appears in excel on the sheet tab. Doing
this you need to use the quotation marks. If you refer to the sheet number
as provided by VBA you do not need the quote marks.
--
JNW


"Tim Davies" wrote:

Where do I need the "'s and, should I use the Name of the sheet or the (name)
of the sheet?

"JNW" wrote:

In ThisWorkbook paste the following:
Private Sub Workbook_Open()
Sheets("mysheet").ScrollArea = "A1:D10"
End Sub

Make sure to change the sheet name and range. You can repeat the line for
all the sheets you want to limit.
--
JNW


"Tim Davies" wrote:

Thanks, How would I go about doing that?

"Tim Davies" wrote:

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Scroll Area Problem

Thank you so much, you are an absolute deity at this!!!

Tim

"JNW" wrote:

It can't be in the sheets code. It has to be in the "ThisWorkbook" code.
Also, you need quotes around the area listed as the scroll area. Also remove
the space after the colon.

In VBA, unless something is defined in VBA itself (not even excel) or a
number it must have quotes around it.
--
JNW


"Tim Davies" wrote:

I have got this code in the branch "microsoft excel projects", then "Sheet2
(Room Sessions):
Private Sub Workbook_Open()
Sheets("Room Sessions").ScrollArea = A1: AA72
End Sub

Yet this still does not help.

"JNW" wrote:

I always use the sheet name that appears in excel on the sheet tab. Doing
this you need to use the quotation marks. If you refer to the sheet number
as provided by VBA you do not need the quote marks.
--
JNW


"Tim Davies" wrote:

Where do I need the "'s and, should I use the Name of the sheet or the (name)
of the sheet?

"JNW" wrote:

In ThisWorkbook paste the following:
Private Sub Workbook_Open()
Sheets("mysheet").ScrollArea = "A1:D10"
End Sub

Make sure to change the sheet name and range. You can repeat the line for
all the sheets you want to limit.
--
JNW


"Tim Davies" wrote:

Thanks, How would I go about doing that?

"Tim Davies" wrote:

I have a problem in that I set a scroll area on a sheet in VBA, press the
save button in VBA, and then return to my worksheet, test the scroll area,
and it works perfectly. I then save the workbook, and close it. When I open
it again, it asks me wether I want to enable macros, so I do enable them, but
find that the scrool limits have dissapeared in VBA, and do not work in the
sheet.
Can anyone help/explain what I'm doing wrong?

Tim

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 George Excel Programming 1 September 29th 06 01:42 PM
Problem with scroll area Juuljus Excel Programming 1 April 18th 06 03:11 PM
Scroll Area Paul Dusterhoft Excel Discussion (Misc queries) 8 September 21st 05 11:36 AM
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 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"