Accept/Decline Dialog box 
Author Message
 Accept/Decline Dialog box

Hi,

I want to display a dialog box on opening a file with a
Condition and allow the user to accept/decline opening of
the excel file. If accept then the sheet opens normally,
if decline then the sheet closes.
I have written something but excel always prompts with a
macro virus warning message. If the disable macros option
is selected, the worksheet opens and I don't want this to
happen. Can anyone suggest a way of doing this?

Thanks very much

Best Regards

Richard



Sun, 24 Oct 2004 22:55:38 GMT  
 Accept/Decline Dialog box
Hi Richard:

You cannot keep the macro warning from showing on another user's
machine, unless you want to get into digital certificates and the like.
--
Regards,

Vasant.

**No direct emails please--keep discussion in newsgroup.**


Quote:
> Hi,

> I want to display a dialog box on opening a file with a
> Condition and allow the user to accept/decline opening of
> the excel file. If accept then the sheet opens normally,
> if decline then the sheet closes.
> I have written something but excel always prompts with a
> macro virus warning message. If the disable macros option
> is selected, the worksheet opens and I don't want this to
> happen. Can anyone suggest a way of doing this?

> Thanks very much

> Best Regards

> Richard



Sun, 24 Oct 2004 23:06:37 GMT  
 Accept/Decline Dialog box
Your problem is that if you can't run the macro then you can't enforce your
conditions, and the user decides whether to let you run the macro. I would
use an intermediate workbook to solve this. Put your code in the "Intro"
workbook that gives them the condition. If they agree to the macro and to
the condition, then your code opens the 2nd workbook. If they agree to the
macro but not the condition, it closes the "Intro" workbook and nothing else
happens. If they don't agree to running the macro, they are only left with
an empty spreadsheet that does no harm. This would be very easy. The only
tricky part is that once they see the 2nd workbook once, they could get to
it a second time without agreeing to anything by opening it directly, unless
you place it in a place or in a way that only the "Intro" macro (or
yourself) can get to it. I suppose a password would be one solution, where
the "Intro" macro knows the password but the user would not.

Richard Choate, CPA


Quote:
> Hi,

> I want to display a dialog box on opening a file with a
> Condition and allow the user to accept/decline opening of
> the excel file. If accept then the sheet opens normally,
> if decline then the sheet closes.
> I have written something but excel always prompts with a
> macro virus warning message. If the disable macros option
> is selected, the worksheet opens and I don't want this to
> happen. Can anyone suggest a way of doing this?

> Thanks very much

> Best Regards

> Richard



Mon, 25 Oct 2004 00:02:33 GMT  
 Accept/Decline Dialog box
Hey Richard

Another solution to the two already posted could be:

1) Make an information sheet like: "This workbook can only be accessed when
macro is accepted."

2) Place some code in ThisWorkbook's BeforeSave event that very hides all
the worksheets but the information sheet. After the save the inverse process
should be accomplished.

3) Place some code in ThisWorkbook's Open event that unhide all the
essential sheets and very hide your information sheet.

In case the user didn't accept the macros, he will only see your information
sheet with no possibility to access the essential sheets.

Regards

Erik



Quote:
> Hi,

> I want to display a dialog box on opening a file with a
> Condition and allow the user to accept/decline opening of
> the excel file. If accept then the sheet opens normally,
> if decline then the sheet closes.
> I have written something but excel always prompts with a
> macro virus warning message. If the disable macros option
> is selected, the worksheet opens and I don't want this to
> happen. Can anyone suggest a way of doing this?

> Thanks very much

> Best Regards

> Richard



Mon, 25 Oct 2004 00:39:06 GMT  
 Accept/Decline Dialog box
Richard,
Erik's idea is the best one. I may use it myself sometime.
Richard Choate, CPA


Quote:
> Hi,

> I want to display a dialog box on opening a file with a
> Condition and allow the user to accept/decline opening of
> the excel file. If accept then the sheet opens normally,
> if decline then the sheet closes.
> I have written something but excel always prompts with a
> macro virus warning message. If the disable macros option
> is selected, the worksheet opens and I don't want this to
> happen. Can anyone suggest a way of doing this?

> Thanks very much

> Best Regards

> Richard



Mon, 25 Oct 2004 00:51:20 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Accepting and Declining Tasks

2. Printing Task accept and decline

3. Task request/accept/decline

4. No Accept/Decline option in tasks

5. Accept/Decline task

6. accept/decline buttons

7. Meeting Accept/Decline/Tentative.

8. Automatic Meeting Accepted/Declined Response

9. Outlook 2000 Net Folders no accept or decline buttons

10. Net folders Accept / Decline


 
Powered by phpBB® Forum Software © phpBB Group