Box of MSG Options (based on the close workbook)

Hi all

I want to write vba for the Workbook_BeforeClose event code


Private Sub Workbook_BeforeClose(Cancel As Boolean)

MsgBox "Are you sure you fill in all the required data", vbYesNoCancel

If vbNo then

If vbcancel then

Fake Workbook_BeforeClose

End If

End if

EndSub


What I want is: if I click No vb or cancel, work book will not close.

I've updated above code, but does not.

Please suggest.

Thank you
Chebli

Hello

The question you posted would be better suited to development MSDN Visual Basic forums.
http://social.msdn.Microsoft.com/forums/vstudio/en-us/home?Forum=vbgeneral

Tags: Windows

Similar Questions

  • change text frame options based on the content paragraph style

    Hi Experts,

    Write a script to change the options of text block when this frame contains particular style (s), but I get an error message such as the object is not valid when I pass the line 12. Can someone please help me find the error?

    And can some on please show me where can I find exactly what that error is on ESTK?

    var mystyle=["caption"];
    for(k=0;k<mystyle.length;k++)
    {
    app.findGrepPreferences = null;
    app.changeGrepPreferences = null;
    app.findGrepPreferences.appliedParagraphStyle = mystyle[k];
    var fnd = app.findGrep();
        for (a=0; a<fnd.length; a++)
            {
                var myTextFrame = app.selection[0].textFrames[0];
                alert (myTextFrame);
                myTextFrame.textFramePreferences.firstBaselineOffset=FirstBaseline.ASCENT_OFFSET;
                myTextFrame.textFramePreferences.minimumFirstBaselineOffset=6;
                myTextFrame.fit(FitOptions.FRAME_TO_CONTENT); 
    
    
            }
    app.findGrepPreferences = null;
    app.changeGrepPreferences = null;
    }
    

    something along this... not tested

    var styleNames = ["caption"];  table to fill

    var doc = app.activeDocument;

    for (variety p = 0; p)< stylenames.length;="">

    {

    app.findGrepPreferences = null;

    app.changeGrepPreferences = null;

    app.findGrepPreferences.appliedParagraphStyle = doc.paragraphStyles.itemByName (styleNames [p]);

    find var = app.findGrep ();

    If (find.length > 0) setTFProps (find);

    }

    function setTFProps (find)

    {

    for (var i = 0; i)< find.length;="">

    {

    var parentTextframe = find[i].parentTextFrames[0];//assuming only textFrame by legend

    with (parentTextframe)

    {

    textFramePreferences.firstBaselineOffset = FirstBaseline.ASCENT_OFFSET;

    }

    pT.fit (FitOptions.FRAME_TO_CONTENT);

    }

    }

    app.findGrepPreferences = null;

    app.changeGrepPreferences = null;

  • Box text entry actions based on the value

    Hello..

    I am currently working on a software simulator where users search for commands by typing an order number in a search box... In Captivate, I created a box of text with the button 'send', what I am trying to achieve is if the user type specific value (digits) and click 'submit' button it will take them to a specific project slide, BUT if they the type value of the difference (in the same entry box) and click on 'submit' button, they will need to slide in the project different?

    hope that I have explained clearly the question... BTW, I am using Captivate v5

    Thank you

    OK, you know how to add the correct entries. The infinite attempts value and create this conditional action to trigger success for ETB:

    I created a user variable to associate with the ETB instead of the generic, it is labeled v_order.  I scored the slides to move to so, which makes it easier to use in a tip action. Screenshots are from CP8, so will look slightly different for you, but what you hneed is the same.

  • Discoverer Viewer doesnot export all sheets in the same workbook?

    Hello

    In discoverer Viewer, I have a workbook that has 4-5 leaves. I need to export in a single excel workbook.
    I am able to export individual sheets in Excel, but not all in the same Excel workbook.

    When I try to export doesnot show me the option to export the entire workbook, as it does in Discoverer Plus.
    Is there a solution for this?

    Thank you
    VJ

    Hi Vj
    There is no work around for this in the Viewer. It exports only a single sheet at a time as you have well understood.

    The only tool that can do this is Discoverer Desktop.

    As much as I know this feature is not intended for a future version either so I think you have to do multiple exports.

    Best wishes
    Michael

  • Response from the user based on the capture option button

    I'm trying to capture the user's response based on the answer Yes or no to a required option button.  If they say yes, they need provide details.  Radio button values N and Y, nothing listed under the item, the captions are turned off. I used the sample LiveCyclePopUp.pdf by George Kaiser as a go - by and changed to my name of the radio button field/text and added the invisible/visible, but no luck.

    Here's what I'm trying, but it doesn't, nothing happens when I click either Yes or no, use javascript.

    Once it is not working properly, if possible, I would like to add to my button "submit" a double check to make sure if this radio button answer is Y and the text box is null, go back and give the answer, but the most important part is to get this working of the part.  Any ideas what I'm missing?  Thank you!

    switch (this.rawValue)
    {
        case "Y":
        Response25AY.presence = "visible";
        Response25AY = xfa.host.response("Please enter "YES" details (date, injury details, corrective action) below", "Q25A YES DETAILS", "Please enter "YES" details (date, injury details, corrective action) here . . . ");
        break; 
        
        case "N":
        Response25AY.presence = "invisible"; 
        break; 
    
    }
    

    Hello

    First of all, the syntax is JavaScript, so when the Response25AY setting, you must include .rawValue:

    Use of quotes in the script will give an error of syntax (around the YES).

    A small note: I would not repeated the question as a default value. It does not really add value.

    So this should be the closer:

    Response25AY.rawValue = xfa.host.response("Please enter YES details (date, injury details, corrective action) below", "Q25A YES DETAILS");
    

    Can you check the relative reference of the radio to the Response25AY object group. It may be that the reference in the script is not full enough and that it is incomplete.

    Also I place this script in the click event of the radio button exclusion group.

    Finally, check the JavaScript Console (control + J) when previewing the form, to find errors.

    Hope that helps,

    Niall

  • In the drop-down list box with header options.

    Well, I don't know if it is possible, but I'll ask anyway. Partially because I have limited real estate FP and also because I think it's a relatively easy way for the user to use, I came up with the following idea:

    I want something that looks like a ring of menu when the not selected, displays the text "plots". Then, when it is selected a list/menu opens downwards (as opposed to the default operation of the rings of menu). In this list/menu will be one element for each parcel of land that appears on a XY Chart. Each item contains a check box (control) and a string (indicator). Channels each displays the name of their respective field. The user can then click on the menu/list/thing to display the items in the plots and may check or uncheck however much they want. The idea is that regardless of the parcels are checked will be displayed on the XY graph.

    First of all, I've explained this well enough and on the other hand, is it possible?

    Thank you.

    James

    Similar to the menu Options Thread in these forums (look upward and to the left), when the mouse is hovered above / clicked, a menu appears with fields of string type. You could create something like this with boxes also. To do this (and maybe it's not the best way but just my first thought ) you might have a Subvi borderless modal appear positioned on the control that has controls and indicators to the breast that you need chains. It appears when you click on your 'Plots' control (which could be an indicator of simple string). It would disappear if the user moved the mouse outside the window of the Subvi for more than a few seconds (as for the menu Options Thread above).

    The Subvi should resize based on the number of details of XY graph curve that it should display, but it's not too difficult.

    There may be some drawbacks to that I thought not again but...

  • Calculate values based on the boxes are checked - for Dummies...

    Hello and thank you all in advance for your help. I'm trying to calculate a value based on the boxes checked. Specifically, I would like to add a particular value $$ each CheckBox and if this box is checked, I want to add to the total rental value (see screenshot below):

    Screenshot (1).png

    As you can see in the screenshot that I have different areas that can be selected (first floor, court before, etc.), I want to assign a value to the checkbox of each region (and added value for others) and calculate a total in the "Balance of rental fees" less the deposit. I'm new with java and scripts but not know how to do it in an excel formula. I guess it's very different from what little I know of Java. Any help you can give me would be greatly appreciated.

    Calculation options are in the text field. In this screen, you only need to set the value of exports to the amount this box represents.

  • How to write Save function based on the drop-down list box selection data in app mxml flex4 with as3

    Hi all

    I'm working on the application web flex4 with as3.

    I have a doubt, I've created a mxml it has two text boxes, except the button and a combo box that is has two option as a percentage and the amount.

    my needs are I gave here.

    need 1: when I choose option amount that two text boxes does not have to be editable.when I select text tat box two percentage option will be editable.

    need 2: when I select the percentage in combox option and two text boxes are empty, and then click the button Save-> I want to display warning msg

    need 3: when I select the option amount combox and the two boxes are emptu click the button Save-> I don't want any warning messages.

    How to validate it and how to write backup for this function.

    This is my sample code:

    list box ID = baseAmtPer

    ID TextBox1 = maxCommAmt.text

    ID = baseAmtPer.text text box

    If (((baseAmtPer.editable!=true) & & (maxCommAmt.editable! = true)) & & ((baseAmtPer.text=="") & &(ma xCommAmt.text=="")) |) (baseAmtPer.text == "") | (maxCommAmt.Text=="")) -> This condition not allowing while I'm selecing amount in combo box. How the TWO TEXT BOX WILL BE EMPTY for this problem

    {

    Alert.Show ("enter in all areas", "Information");

    }

    on the other

    {

    some encodings

    }

    Hello

    Please go through the following Code:

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight >

    Import mx.collections.ArrayCollection;

    Import mx.controls.Alert;

    Import spark.events.IndexChangeEvent;

    protected function button1_clickHandler(event:MouseEvent):void

    {

    If (comboBox.selectedItem == "Percentage" & textBox1.text == "" & textBox2.text == "") {}

    Alert.Show ("enter the values");

    }

    }

    protected function comboBox_changeHandler(event:IndexChangeEvent):void

    {

    {if(ComboBox.SelectedItem=="Amount")}

    textBox1.editable = false;

    textBox2.editable = false;

    }

    else {if(comboBox.selectedItem=="Percentage")

    textBox1.editable = true;

    textBox2.editable = true;

    }

    }

    ]]>

    Amount

    Percentage

    Thank you and best regards,

    ------------------------------------------------------------------------------------------ --

    Vibhuti Gosavi . [email protected] | www.infocepts.com

    ------------------------------------------------------------------------------------------ --

  • When I start Firefox, I always "Welcome to Firefos" tab. I tried to change the options for mu, but when I close Firefox, the options return to the origional options before them, I changed. How to fix the problems of St?

    When I start Firefox, I always "Welcome to Firefos" tab. I tried to change the options for mu, but when I close Firefox, the options return to the origional options before them, I changed.

    Looks like your current profile does not work correctly.

    Create a new profile as a test to see if your profile is the source of the problems.
    See basic troubleshooting: make a new profile:

    If this new profile works then you can transfer files from the old profile to the new profile (be careful not to copy corrupted files)

    See:

  • Dell Inspiron 531 - summer pc try to restore factory settings and hit the F8 key after close to a dozen times. I never see the advanced options to choose the factory restore. HELP please...

    tried to restore factory settings and hit the F8 key after close to a dozen times.  I never see the advanced options to choose the factory restore.   HELP please...  I'm following indications out of Dell's web site as well.    UGH

    http://support.Dell.com/support/topics/global.aspx/support/DellCare/contact_us?c=us&l=en&s=Gen&redirect=1

    If you have problems with the process of recovery of Dell, contact Dell at the link above.

    It's Dell recovery, not Microsoft software/process of.

    See you soon.

    Mick Murphy - Microsoft partner

  • When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036

    Error image system original title: windows 7 0 x 81000036

    I'm doing a backup system image.  When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036.

    I have an ESATA connection on my Dell laptop I was trying to make the image on.  I use the unit every day to save files and which works very well.  He just leaves me CCADE with the system image backup...

    any ideas?

    Hello

    ·         You have created a system image backup before that?

    ·         You did it changes on your computer?

    ·         Is your esata formatted NTFS drive?

    Try to save the image of the boot system: http://support.microsoft.com/kb/929135

    Note: make sure that you start the computer in normal mode after a repair.

    See also the linkfor more information about the backup: http://windows.microsoft.com/en-US/windows7/Back-up-your-programs-system-settings-and-files

  • Change the content of the page based change the selection box

    Hi all

    I want to create a page with 2 box selection and 1 table below

    • Selection box
      • Box1: 1-12 (months of the year)
      • Box2: 2010-2015 (year between 2010 and 2015)
    • Table
      • Get data from view GET_DATA_SALARY. This view having a 4 column: NAME, SALARY, FAC_MONTH, FAC_YEAR
      • This table will be based on the selected value of 2 boxes above change

    Please help me solve this problem.

    Thank you

    To put it simply, add a button that submits the page.

    Add a where clause clause to your report

    where FAC_MONTH = P_MONTH

    and FAC_YEAR = P_YEAR

    Gus

  • Advanced box option missing in the dialog create/edit view - 4.0.3

    I just upgraded to 4.0.3 and when I right click on a view and change has chosen, the option to check the advanced checkbox is missing. It is there in the dialog box change the Table just as it was in version 3. Does anyone know if I'm missing something.

    Thanks in advance.

    Chris

    So that requeteur was problematic. I use the query designer in the worksheet to prepare your request, then paste in the editor view.

    We have a query designer for views in the Data Modeler if you do not want to give that a shot.

  • Calculation based on the box help please...

    I'm doing a text box run a calculation based on whether or not a radio button is checked or not.

    If the radio button named 'Built' in the group 'Type of Quilting' is checked, then the text box "By squirting the load" must find the value of the field "Total Square Inches" and multiply this total by 0.015 and show the new total in the text box as a monetary value, if the 'Casting' radio button is not checked the value in the field 'Charge of basting"should be"- 0 -".

    I can get the calculation that I want this:

    var v1 = getField("Total_Square_Inches").value; Event.Value = v1 * 0.015;

    But how to understand the function of the radio button and "- 0 -"?

    If the name of the field is built, the calculation script could be:

    (function () {}

    Get field values

    var v1 = getField("Total_Square_Inches").value;

    var v2 = getField("Basting").value;

    Set this field value

    If the check box is selected in function

    If (v2 = 'Off') {}

    Event.Value = 0;

    } else {}

    Event.Value = v1 * 0.015;

    }

    })();

  • Combo box options all at the same time showing them?

    I made a pdf for viewing on iOS form.  Specifically I tested it on my iphone4.  All drop-down list boxes display all selectable options of together on a single line just below the drop-down list box, pictured below.  Sorry for the awful color, boxes are supposed to be white.  If there was no development on the fields not highlighted in the iOS reader please let me know!  A way to solve the words shattered under each box?

    photo.PNG

    Thank you very much

    David

    Hi David,

    Your form has been drafted with InDesign that uses a format of appearance that is currently not compatible with the Mobile Player.  I added your example file to our internal bugs database alongside others who are facing this problem.  Fortunately, incompatible appearances can be corrected with the help of Acrobat/Reader.  I browsed your PDF Acrobat form and corrected appearances.  I sent the PDF form with appearances corrected towards you.  Please let me know if this solves your problem in the short term.  Longer term, we hope to resolve the incompatibility between InDesign and Reader Mobile.

    Best regards

    Darrell

Maybe you are looking for