• WSJanB

    WSJanB

    @wsjanb

    Viewing 15 replies - 631 through 645 (of 666 total)
    Author
    Replies
    • in reply to: Template Dialog Macro? (Word 2002) #776026

      It is possible to set a specific tab as the default when opening a dialog:

      Dialogs(wdDialogFileNew).DefaultTab = xxx

      As soon as you type the “=” you get a pop-up list with all the possibilities. Unfortunately this list contains all tabs, not just the ones for the dialog you want (wdDialogFileNew in this case).

      Hope this helps.

      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #774963

      I’ll give you an example:

      Public Sub HandleFormXYZ()

      Load frmFormXYZ

      With frmFormXYZ
      .opt1.Caption = “One”
      .opt2.Caption = “Two”
      .opt3.Caption = “Three”
      .txtBox.txt = “Example”
      End With

      frmFormXYZ.Show

      ‘Rest of code
      End Sub

      I hope this clears up what I meant.

      Thanks
      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #774964

      I’ll give you an example:

      Public Sub HandleFormXYZ()

      Load frmFormXYZ

      With frmFormXYZ
      .opt1.Caption = “One”
      .opt2.Caption = “Two”
      .opt3.Caption = “Three”
      .txtBox.txt = “Example”
      End With

      frmFormXYZ.Show

      ‘Rest of code
      End Sub

      I hope this clears up what I meant.

      Thanks
      JanB

    • Thanks Hans! I found the help item you were referring to. thankyou

      JanB

    • Thanks Hans! I found the help item you were referring to. thankyou

      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #774272

      Sorry, that didn’t work. sad
      The form is loaded first and Initialize fired, then changes are made to radiobuttons and textboxes, overriding the Setfocus in Initialize. I also tried to explicitly Setfocus on the last object changed in the form before activating it with Show, but that didn’t help.

      During the test a collegue told me that he experienced a similar problem with one of the Lotus Notes panels. So maybe it’s not a Word XP/2003 or VBA problem, but a Windows XP issue…? confused

      Thanks anyway!
      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #774273

      Sorry, that didn’t work. sad
      The form is loaded first and Initialize fired, then changes are made to radiobuttons and textboxes, overriding the Setfocus in Initialize. I also tried to explicitly Setfocus on the last object changed in the form before activating it with Show, but that didn’t help.

      During the test a collegue told me that he experienced a similar problem with one of the Lotus Notes panels. So maybe it’s not a Word XP/2003 or VBA problem, but a Windows XP issue…? confused

      Thanks anyway!
      JanB

    • Thanks for your input, Jefferson, that does the trick!
      I looked for something along that line, but could not find a suitable property for the dialog panel. And when I placed the dot and “f” after Dialogs(wdDialogFileSaveAs) there was no Format property in the list. A hidden feature?

      JanB

    • Thanks for your input, Jefferson, that does the trick!
      I looked for something along that line, but could not find a suitable property for the dialog panel. And when I placed the dot and “f” after Dialogs(wdDialogFileSaveAs) there was no Format property in the list. A hidden feature?

      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #774185

      Thanks Jefferson. I’ll give it a try.

      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #774186

      Thanks Jefferson. I’ll give it a try.

      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #772881

      Thanks for the suggestion. I tried that too. Both manually and with VBA Code Cleaner. No joy.
      As I said in my original posting, the forms appears to have the focus (i.e. color of title bar). A thought: in Word 97 all forms are modal and I know that this is not the case in Word XP / 2003. Can this have any bearing on the problem? If so, what can be done to make sure the forms behave like a modal form in Word 97? (I can’t use the test PC’s today to experiment on the matter.)

      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #772882

      Thanks for the suggestion. I tried that too. Both manually and with VBA Code Cleaner. No joy.
      As I said in my original posting, the forms appears to have the focus (i.e. color of title bar). A thought: in Word 97 all forms are modal and I know that this is not the case in Word XP / 2003. Can this have any bearing on the problem? If so, what can be done to make sure the forms behave like a modal form in Word 97? (I can’t use the test PC’s today to experiment on the matter.)

      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #772844

      The user-templates don’t contain any code or form. All forms and code are in a seperate code-template sitting in the Word Startup directory, so they can be used in any template throughout the session of Word. There are 9 forms, 7 of which are called by a Sub activated by a click on a button in a commandbar and 2 are called by a FormField ExitMacro. The forms contain radiobuttons and/or textboxes for user choices/input. Most of them just have a OK-button and no Cancel-button to force the user input. For that reason they contain a Private Sub UserForm_QueryClose to prevent closing the form with the X-button.
      Usually the form is first Loaded, changes to radiobuttons and textboxes are made based on former input or standards, then the form is activated (frmName.Show). The form-code usually is limited to Private Sub cmdOK_Click and, if appropriate, Private Sub cmdCancel_Click, both hiding the form. In 2 cases there is a Private Sub Userform_Initialize, resetting a few values. Then the calling Sub is reading and handling the results from the form, followed by a Unload of the Form.
      I’ve tested it on 2 different (hardware) PC’s with Windows XP Pro SP1 and Office XP / 2003 (all Dutch versions) and nothing else installed. The phenomenon is consistent on both PC’s. Closing and restarting Word as Jefferson suggested and rebooting the PC’s don’t make any difference.

      Thanks
      JanB

    • in reply to: Focus problem? (Win XP / Word XP/2003) #772845

      The user-templates don’t contain any code or form. All forms and code are in a seperate code-template sitting in the Word Startup directory, so they can be used in any template throughout the session of Word. There are 9 forms, 7 of which are called by a Sub activated by a click on a button in a commandbar and 2 are called by a FormField ExitMacro. The forms contain radiobuttons and/or textboxes for user choices/input. Most of them just have a OK-button and no Cancel-button to force the user input. For that reason they contain a Private Sub UserForm_QueryClose to prevent closing the form with the X-button.
      Usually the form is first Loaded, changes to radiobuttons and textboxes are made based on former input or standards, then the form is activated (frmName.Show). The form-code usually is limited to Private Sub cmdOK_Click and, if appropriate, Private Sub cmdCancel_Click, both hiding the form. In 2 cases there is a Private Sub Userform_Initialize, resetting a few values. Then the calling Sub is reading and handling the results from the form, followed by a Unload of the Form.
      I’ve tested it on 2 different (hardware) PC’s with Windows XP Pro SP1 and Office XP / 2003 (all Dutch versions) and nothing else installed. The phenomenon is consistent on both PC’s. Closing and restarting Word as Jefferson suggested and rebooting the PC’s don’t make any difference.

      Thanks
      JanB

    Viewing 15 replies - 631 through 645 (of 666 total)