PC Review


Reply
Thread Tools Rate Thread

Disable scrolling when macros disabled

 
 
anon
Guest
Posts: n/a
 
      22nd Mar 2008
Hi,

When my wb is opened with macros disabled only one sheet is visible. I
want to prevent the user from scrolling on this sheet, which i can do
when macros are enabled but not when discabled. Is there a way to do
this? (I tried setting the scroll area but this doesn't seem to take
effect when macros are disabled).
 
Reply With Quote
 
 
 
 
pswanie
Guest
Posts: n/a
 
      22nd Mar 2008
not clear what exactly you need.... but would zoom page to about 70% then
freeze panes in the very bottom right hand conner. then zoom back to 100%?

"anon" wrote:

> Hi,
>
> When my wb is opened with macros disabled only one sheet is visible. I
> want to prevent the user from scrolling on this sheet, which i can do
> when macros are enabled but not when discabled. Is there a way to do
> this? (I tried setting the scroll area but this doesn't seem to take
> effect when macros are disabled).
>

 
Reply With Quote
 
pswanie
Guest
Posts: n/a
 
      22nd Mar 2008
copy and paste the following in youre this workbook code

it will when u close it freeze panes and if u open with out macro's enable
keep it freeze(unable to scroll) if macro's enabled it will be able to scroll


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Range("v60").Select
ActiveWindow.FreezePanes = True
End Sub

Private Sub Workbook_Open()
ActiveWindow.FreezePanes = False
End Sub

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      22nd Mar 2008
Render the workbook useless if users disable macros.

In a beforeclose event, hide all sheets but a dummy sheet with the message "By
disabling macros you have made this workbook useless. Close and enable macros
to continue."

When users enable macros have workbook_open code that hides dummy sheet and
makes your working sheet visible with the scrollarea set as you wish.


Gord Dibben MS Excel MVP


On Sat, 22 Mar 2008 08:48:44 -0700 (PDT), anon <(E-Mail Removed)>
wrote:

>Hi,
>
>When my wb is opened with macros disabled only one sheet is visible. I
>want to prevent the user from scrolling on this sheet, which i can do
>when macros are enabled but not when discabled. Is there a way to do
>this? (I tried setting the scroll area but this doesn't seem to take
>effect when macros are disabled).


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot print document - Macros disabled - no macros! edspyhill01 Microsoft Word Document Management 2 11th Jan 2010 07:56 PM
Macros disabled warning in MS Word doc with no macros Earthman Microsoft Word Document Management 2 29th Dec 2009 07:17 PM
Want to disable save when macros are disabled delfiled@yahoo.com Microsoft Excel Discussion 4 14th Feb 2006 12:57 AM
Removing Excel message to enable macros or disable macros =?Utf-8?B?Ym1pbGxlcjI2Mw==?= Microsoft Excel Misc 2 13th Oct 2004 02:39 PM
Re: The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros. Sue Mosher [MVP-Outlook] Microsoft Outlook Installation 0 17th Feb 2004 05:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:17 PM.