![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 60
|
Is it possible with VBA to stop the user from scrolling the screen with cursur or mouse?
I have already used the following code to go full screen and remove any ways of user intervention with anything but the buttons provided on the sheet. For Each t In Application.Toolbars t.Visible = False Next t With Application .Caption = "Schedule Flexer" .MoveAfterReturn = False .DisplayFormulaBar = False .DisplayStatusBar = False .DisplayScrollBars = False .CommandBars("worksheet menu bar").Enabled = False .DisplayFullScreen = True .CommandBars("full screen").Enabled = False End With With ActiveWorkbook .Windows(1).Caption = Empty .Windows(1).DisplayWorkbookTabs = False .Windows(1).DisplayHeadings = False .Windows(1).DisplayGridlines = False End With Any ideas please? Dan. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Worksheets have a property that sets the Scroll Area where the user can move in. It is called....
ScrollArea It's a string, like Sheet1.ScrollArea = "A1:B2" |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 60
|
Thanks Juan
Is there a way to set all sheets in a workbook at the same time? Dan. |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Not that I know of. This is just one of the times where you HAVE to use a loop.
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
this limitation can also be set in the VBE
Does this help?
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#6 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
RE: Is there a way to set all sheets in a workbook at the same time?
Sure there is, just place this in the Private module of ThisWorkbook. Private Sub Workbook_Open() Me.Sheets(1).Activate End Sub Private Sub Workbook_SheetActivate(ByVal Sh As Object) Sh.ScrollArea = "A1:J15" End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|