Stop sheet showing when Using Datapig's Force Users to enable macr

Hi,

I think this is probably not do-able

I'm using Datapig Technologies example to force users to enable macros

When the workbook is closed all sheets other than a warning sheet are very 
hidden so that if the workbook is opened with macros disabled then the user 
can only see a warning sheet saying to close and open with macros enabled.

Then on opening with macros enabled the waring sheet is very hidden and the 
other sheets can be seen.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
Sheets("Warning").Visible = True
Sheets("Sheet1").Visible = xlVeryHidden

Private Sub Workbook_Open()
Application.ScreenUpdating = False
Sheets("Sheet1").Visible = True
Sheets("Warning").Visible = xlVeryHidden

This works beautifully but when the workbook is closed the user sees the 
warning sheet (and panics!) also confusing for the user is the fact that if 
they save then close they are asked if they want to save their changes but 
they are not aware that they have made any changes.

Does anyone have any suggestions?

I've put a sentence on the warning sheet saying if closing then save 
normally but if opening scroll down to a warning about enabling macros. 
Clunky.

Cheers
-- 
Trish
0
Utf
12/15/2009 11:24:01 AM
excel.programming 6508 articles. 2 followers. Follow

2 Replies
1189 Views

Similar Articles

[PageSpeed] 8

Simply change this:
Code:
--------------------
    
  Private Sub Workbook_BeforeClose(Cancel As Boolean)
  Application.ScreenUpdating = False
  Sheets("Warning").Visible = True
  Sheets("Sheet1").Visible = xlVeryHidden
  
--------------------
to this:
Code:
--------------------
    
  Private Sub Workbook_BeforeClose(Cancel As Boolean)
  Sheets("Warning").Visible = True
  Sheets("Sheet1").Visible = xlVeryHidden
  Application.ScreenUpdating = False
  Msgbox "Please ignore warning sheet, this is for reset purposes!",vbokonly,"Close Notice"
  
--------------------


Trish Smith;587167 Wrote: 
> Hi,
> 
> I think this is probably not do-able
> 
> I'm using Datapig Technologies example to force users to enable macros
> 
> When the workbook is closed all sheets other than a warning sheet are
> very
> hidden so that if the workbook is opened with macros disabled then the
> user
> can only see a warning sheet saying to close and open with macros
> enabled.
> 
> Then on opening with macros enabled the waring sheet is very hidden and
> the
> other sheets can be seen.
> 
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> Application.ScreenUpdating = False
> Sheets("Warning").Visible = True
> Sheets("Sheet1").Visible = xlVeryHidden
> 
> Private Sub Workbook_Open()
> Application.ScreenUpdating = False
> Sheets("Sheet1").Visible = True
> Sheets("Warning").Visible = xlVeryHidden
> 
> This works beautifully but when the workbook is closed the user sees
> the
> warning sheet (and panics!) also confusing for the user is the fact
> that if
> they save then close they are asked if they want to save their changes
> but
> they are not aware that they have made any changes.
> 
> Does anyone have any suggestions?
> 
> I've put a sentence on the warning sheet saying if closing then save
> normally but if opening scroll down to a warning about enabling macros.
> Clunky.
> 
> Cheers
> --
> Trish


-- 
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=162610

[url="http://www.thecodecage.com"]Microsoft Office Help[/url]

0
Simon
12/15/2009 11:43:02 AM
Hi Simon,
That does the job!
Thank you.

-- 
Trish


"Simon Lloyd" wrote:

> 
> Simply change this:
> Code:
> --------------------
>     
>   Private Sub Workbook_BeforeClose(Cancel As Boolean)
>   Application.ScreenUpdating = False
>   Sheets("Warning").Visible = True
>   Sheets("Sheet1").Visible = xlVeryHidden
>   
> --------------------
> to this:
> Code:
> --------------------
>     
>   Private Sub Workbook_BeforeClose(Cancel As Boolean)
>   Sheets("Warning").Visible = True
>   Sheets("Sheet1").Visible = xlVeryHidden
>   Application.ScreenUpdating = False
>   Msgbox "Please ignore warning sheet, this is for reset purposes!",vbokonly,"Close Notice"
>   
> --------------------
> 
> 
> Trish Smith;587167 Wrote: 
> > Hi,
> > 
> > I think this is probably not do-able
> > 
> > I'm using Datapig Technologies example to force users to enable macros
> > 
> > When the workbook is closed all sheets other than a warning sheet are
> > very
> > hidden so that if the workbook is opened with macros disabled then the
> > user
> > can only see a warning sheet saying to close and open with macros
> > enabled.
> > 
> > Then on opening with macros enabled the waring sheet is very hidden and
> > the
> > other sheets can be seen.
> > 
> > Private Sub Workbook_BeforeClose(Cancel As Boolean)
> > Application.ScreenUpdating = False
> > Sheets("Warning").Visible = True
> > Sheets("Sheet1").Visible = xlVeryHidden
> > 
> > Private Sub Workbook_Open()
> > Application.ScreenUpdating = False
> > Sheets("Sheet1").Visible = True
> > Sheets("Warning").Visible = xlVeryHidden
> > 
> > This works beautifully but when the workbook is closed the user sees
> > the
> > warning sheet (and panics!) also confusing for the user is the fact
> > that if
> > they save then close they are asked if they want to save their changes
> > but
> > they are not aware that they have made any changes.
> > 
> > Does anyone have any suggestions?
> > 
> > I've put a sentence on the warning sheet saying if closing then save
> > normally but if opening scroll down to a warning about enabling macros.
> > Clunky.
> > 
> > Cheers
> > --
> > Trish
> 
> 
> -- 
> Simon Lloyd
> 
> Regards,
> Simon Lloyd
> 'Microsoft Office Help' (http://www.thecodecage.com)
> ------------------------------------------------------------------------
> Simon Lloyd's Profile: 1
> View this thread: http://www.thecodecage.com/forumz/showthread.php?t=162610
> 
> [url="http://www.thecodecage.com"]Microsoft Office Help[/url]
> 
> .
> 
0
Utf
12/15/2009 3:11:01 PM
Reply:

Similar Artilces:

Show GAL in Journal contacts
hi, When entering a new entry in the "Journal" and selecting contacts, I am only able to see my personal contacts. Is there a way to make the Global Address List and option without having to copy it to my personal contacts? thanks, Jen ...

Creating Multiple Worksheets From A Single Sheet
I need some help to find a way of creating multiple worksheets from a single sheet. I have created a Macro that will insert page breaks after each change of supplier code, I now need to put each set of supplier codes onto seperate sheets in the same workbook... Please help!! Try this http://www.rondebruin.nl/copy5.htm Use the last macro on this page for all unique values -- Regards Ron de Bruin http://www.rondebruin.nl "Beccy" <Beccy@discussions.microsoft.com> wrote in message news:96F67F34-766A-4D37-B359-ADB7278080B3@microsoft.com... > I need some help to find a way...

How to copy/paste info into the protected sheet
I trying to copy/past info from one sheet to another that is protected. However even though the info copies into the sheet I have to debug my macros for some reason since it always takes me automatically to the VB page. I would not like to have to use password that the user needs to enter every time he tries to copy/paste info nor would I like to define users that will be able to do that since I don't know who will be using the document. Is there a way to do this and still not have to change my macros. Thanks >>Is there a way to do this and still not have to change my ma...

Accrued vacation showing on payroll stub
With GP 9.0 going to GP 10.0, I would like to be able to show our employees, on their paycheck stub, the accrued vacation they have available. The information is in GP, and it accrues every pay period, but I can't seem to find a way to move that information to the paycheck reporting stub. I have been preparing a seperate voucher to show them their accrual. Thanks, Phil If you are using GP Payroll - launch report writer and drag over the fields: Vacation Available and Sick Time Available from the Payroll Work Check Table "Phil" wrote: > With GP 9.0 going to GP 10.0, I wo...

disable snap-to while dragging tab stops?
How do I drag a tab stop to arbitrary position without it snapping to the tick marks on the ruler? I tried holding down shift, ctrl, alt. None of them works. I even turned off everything in the arrange->snap menu. Publisher 2003. Set the tab to about where you want it, zoom to 200%, open the tab dialog and input the number where you want the tab positioned, click set. The tab button can be dragged to your toolbar by customizing. This is the best that Publisher can do... -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "p...

sheet size
Hi all, I have a strange question. I have a sheet that has maybe 100 rows. The scroll bar on the right allows me to move quickly from top to bottom etc. I then delete, or move to another sheet say 80 rows. The scroll bars remain aligned or sized to a sheet with 100 rows. Is there any way to resize the scroll bars to active data only, or maybe occupied rows. jim Jim You can reset the "apparent" used range by deleting rows below your "real" used range the save the workbook. Some versions also require a close and reopen before you see any change. Note: this must be...

Direct Email Button not available for user
One of my Users does not see the Direct Email Button on any screen, including advanced find or contacts or leads. What privilege do I need to give her to SEND Direct Email (and the button to show up)?? Thanks!! ...

stops responding
A few days ago while trying to balance one of my accounts, Money would start hanging and I had to kill the process and created a LRD file. My file is only 12MB and it has been fine until recently. I am using Money 2007. I should have put my system specs. I have a P4 3.8GHZ w/ 2GB RAM running XP Pro. When I have Money open, I typically only have Messenger, a browser, and sometimes Acroabat Reader running also. "Casey" wrote: > A few days ago while trying to balance one of my accounts, Money would start > hanging and I had to kill the process and created a LRD file. ...

New users don't show up in Global Address List?
Outlook software is used for email. Inter-office personnel are listed in global address list. A new user was set up yesterday, server recognizes new user, but is not listed in global address list. User is however, listed under "all users". How do I get user to show up in global list? Older versions of office has no problems. XP small business and basic is the problem. Thank you. Tallylassie wrote: > Outlook software is used for email. Inter-office personnel are > listed in global address list. A new user was set up yesterday, > server recognizes new user, but i...

Using CDOEXM to move mailboxes in an Exchange 2003
I posted this in the scripting newsgroup, but I was wondering if anyone can point me in the right direction. Is there a limit when you use CDO to move mailbox in an exchange 2003 environment? It seems like on the seventh mailbox move the script fails. We have a couple hundred of mailboxes that we need to move. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_imailboxstore_movemailbox.asp, we are using code some what like this ...

How to count number of sheets
How to put the total number of sheets in a work cell? Thanks One way... Create this defined name... Goto the menu Insert>Name>Define Name: SheetNames Refers to: =GET.WORKBOOK(1)&T(NOW()) OK Then, to get the count of worksheets: =COUNTA(INDEX(SheetNames,0)) -- Biff Microsoft Excel MVP "booshi" <booshi@presidency.com> wrote in message news:OJ4SLtmuKHA.4492@TK2MSFTNGP05.phx.gbl... > How to put the total number of sheets in a work cell? > Thanks > hi i don't think there is a function that will do that. there used t...

long name for logon script user
in the domain I have thousands of users, each with its logonscript, according as it will have a different user: eg "user1" has the logon script: "user.vbs normal" and "user2" has "privileged user.vbs" (both with spaces) [image: http://img521.imageshack.us/i/borame.jpg/][image: http://img521.imageshack.us/img521/8361/borame.jpg] If clients are Windows XP these scripts are executed, but if they are Windows Vista or Windows 7, not work. It appears that the cause are the quotes, but are necessary because the file name contains spaces. It is...

blue stop screen 0x0000007E
stop error code after windows installs drivers. this is new hdd and mobo but problem persists.oxoooooo7e (oxf748eobf oxf78da2o8,oxf78d9fo8....was doing it with last mobo and hdd...help please!!! -- thanks one and all for your helping hands xerxies wrote: > stop error code after windows installs drivers. this is new hdd and > mobo but problem persists.oxoooooo7e (oxf748eobf > oxf78da2o8,oxf78d9fo8....was doing it with last mobo and hdd...help > please!!! That *is* a driver issue. You are installing the incorrect drivers or need to contact the manufacturer of said ...

Copying sheet problem
Hello I have a about 20 sheets or more but i adding more but i have a problem when i copy them i have a message come up message: A formula or sheet you want to move or copy contains File.dir file.fullname file.name file.sheet.name name.gg It ask if i want to use the version if yes the sheet copies fine but things like the option buttons start to act fun eg only one will select but the other in the group will not I have not had this problem in the past with copying sheets (it just copied) Help what is all that about Hope you can help Thanks -- Rmagic ------------------------------...

recipient policy stopped working
Hello All, I'm seeing an issue in my Exchange 2003 environment where an admin will create a new account and the recipient policy does not populate the users email address. This just started happening a few days ago here in the US... It happened in our UK office last week but I thought that might have been user error on the admin. We are in mixed mode with Exchange5.5, which we have been for almost a year. I did how ever remove some old 5.5 servers but the last one I removed was almost a month ago, so i don't think it would be that. I know you need to ask this question so yes th...

How do I merge 3 lines of text to show in one row?
I am doing a family history excel document. One row should have approx. 3 lines of info, however, I can only get one row of info to show. When I dclick that row the info shows but when I print or do a print preview only one line of info shows. I have merged the cells in that row. It sounds like you need to select Wrap Text from the Alignment tab of the Format Cells dialog and/or increase the height of the row to accommodate the numbers of rows of text in the cell. -- Ian -- "pita29" <pita29@discussions.microsoft.com> wrote in message news:E3D24CC3-7B38-4461-9B29-6...

How do I stop a cc email to myself from going to deleted folder
Sometimes when I send an email, I want to keep a copy ofr myself. When I enter my email address in the cc part, this always goes straight to the deleted folder, even though I have my email listed as a safe sender. Any suggestions? On 13/03/2010 01:53, technochallenged wrote: > Sometimes when I send an email, I want to keep a copy ofr myself. Outlook automatically keeps a copy of every email you send in the Sent Items folder. There is no need to cc yourself. "technochallenged" <technochallenged@discussions.microsoft.com> wrote in message news:D4...

Formating to show square meters ie m2
I would like to be able to format in excel the square meters symbol ,which is m with a small 2 just above, is this possible please ? Many thanks Select your range, press Ctrl + 1, go to the Number tab,=20 press Custom and enter: General" m=B2" To enter the 2 hold down the ALT key and type "0178" (no=20 quotes) on your numeric keypad. HTH Jason Atlanta, GA >-----Original Message----- >I would like to be able to format in excel the square=20 meters symbol ,which is=20 >m with a small 2 just above, is this possible please ? > >Many thanks >. > You ...

3197: The microsoft Jet Database Engine stopped the process because you and another user are attempting to change the same data at the same time
Hello, I have a fairly large (For Access - its slated to be transferred to MySQL) backend that allows the user to use the database's front end normally to store and retrieve data. However when I try to open the database I get the Error "The microsoft Jet Database Engine stopped the process because you and another user are attempting to change the same data at the same time". This isn't true because I have it on my local computer. I've tried importing to a new DB file and I get the same error. The original DB will not open to allow import (show table list) and show er...

Using a custom form kills forward/reply arrows in the inbox?
Hi, I installed a custom email form in Outlook 2000 and the "Forward" and "Reply" arrows on mails in the inbox disappeared. The arrows reappear on new mails when I swap the default back to IPM.Note but as I really have to use this custom form the absence of the Forward/Reply indicators is a pain. Has anybody come across this issue before? Is there a method to turn these "flags" back on or do I have to dig into the code in the custom form? The custom form is just a modied IPM.Note that provides access to a COM plugin. Thanks! Fin Known issue, dating back t...

Stop all macros
I have a button on a form, which should do different things depending on 1. The data contained within the current record; 2. Whether the current record is a 'new record'; 3. Whether the current record is the first record in the form. On click, an embedded macro is initiated. Each step in the embedded macro has a condition and a corresponding 'RunMacro' action. All the conditions are mutually exclusive, and each sub-macro has a final step of 'StopAllMacros'. So the embedded macro should trigger one, and only one sub-macro. However, it appears that what is act...

Stopping the scroll bar
Hi all, this is my first time. I don't know if this is the right place for this problem but here I go. I have created a template of an invoice the size of an A4 and would like to stop the scroll bar moving both horizantally and vertically in normal view just as if it was in print view. Is that possible through VBA and if yes what is the code that I would need to achieve such task. Thanks in advance --- Message posted from http://www.ExcelForum.com/ Not too sure what you are after but you can remove the scrollbars with <Tools - Options> and then in the View tab, at the bottom,...

What is the TS40202 used for?
Can anyone tell me about the TS40202 table? I have some consistency errors in my database and I have identified the tables that seem to have issues. What module is this table used for? What type of data is housed in the table? It looks like it has to do with "timesheets", but I am not sure if that is a HR, Payroll, Project Accounting, or some other table. I have not had any luck finding it under TOOLS > RESOURCE DESCRIPTIONS > TABLES. Thanks! Lets start with a few questions: 1) what third-party apps are you using? 2) Are you using Business Portal or PDK? Given the ...

need a macro which can combine 2 excel sheets data
I have an excel file with some data till row 50.(can be more or less) and another excel file with data till row 100 (can be more or less) what i want is that i get a macro which automatically adds the dat from second sheet below the data in sheet 1. the data in first file can end on row 50 or 60 or at any row thank u so much any ideas and i have to combine more 30 files like these into that first file -- Message posted from http://www.ExcelForum.com Hi as a starting point see http://www.rondebruin.nl/copy2.htm -- Regards Frank Kabel Frankfurt, Germany "vikram >" <<...

Stopping a Campaign Temporarily
Hi, My client has executed the campaign in Jan 1st 2006 and the end date is Dec 31st 2006. But he wants to stop the campaign temporarily from 15th July 2006 and again start it from 1st Aug 2006. So what is that I need to do for this thing, i have never come across this kind of situation before. Thanks in advance. Regards, Shabbir. ...