• OptionButton prob (Win2K/Off2K/XPP/OffXP)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » OptionButton prob (Win2K/Off2K/XPP/OffXP)

    Author
    Topic
    #384610

    I have written a macro that uses the following code to insert or not insert specific text in a letter.

    If OptButInclude.Value = True Then
    Selection.GoTo What:=wdGoToBookmark, Name:=”OtherFees”
    Selection.TypeText Text:=txtOtherFees

    ElseIf OptButExclude.Value = True Then
    ChosenOption = “”
    End If

    When I run it on my machine, XPP/OffXP, it runs fine. However, I have one user running Win2K/Off2K on whose machine keeps getting a scripting error. She is getting a wee bit annoyed as when iot fails she has input a fair amount of information.

    Can anyone help.

    Viewing 1 reply thread
    Author
    Replies
    • #660376

      Check the references list in the IDE on her PC. I suspect she’s got a
      MISSING: entry that corresponds to some XP level library. See if that’s it
      and identify it then post back…

    • #660425

      Can you post the exact error message? When you say “scripting,” is this something running from Outlook form VBScript to Word, or is it internal to Word?

      • #660428

        Thanks Kevin and escher for replying so promptly (you guys must be like and start work real early, 6:30am).

        One of the problems, I have now realised, was that the Win2K machine did not have the Calendar object loaded. I have overcome this by removing the “select date” function.

        Attached are a couple of screen shots of the error message and one of the highlighted code.

        • #660442

          I’m in California; you won’t catch me in the Lounge at 6:30AM!

          Regarding the calendar control, if this is the DTPicker control from mscomct2.ocx, it is redistributable if you have Visual Basic or Office Developer. But that’s a lot of work if this is the only use of it…

    Viewing 1 reply thread
    Reply To: OptionButton prob (Win2K/Off2K/XPP/OffXP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: