Results 1 to 5 of 5

Thread: What Is Missing At The End of This Macro?

  1. #1
    Guest

    What Is Missing At The End of This Macro?

    Sub main


    MbeCurrentTransform.dgnUnits
    IF MbeSettings.TextLineLength = 101 THEN
    PROC1
    IF MbeSettings.TextLineLength = 102 THEN
    PROC2
    IF MbeSettings.TextLineLength = 103 THEN
    PROC3
    IF MbeSettings.TextLineLength = 104 THEN
    PROC4
    IF MbeSettings.TextLineLength = 105 THEN
    PROC5

    PROC1:
    MbeSendKeyin "LV=6"
    GoTo LABEL_NEXT
    PROC2:
    MbeSendKeyin "LV=19"
    GoTo LABEL_NEXT
    PROC3:
    MbeSendKeyin "LV=31"
    GoTo LABEL_NEXT
    PROC4:
    MbeSendKeyin "LV=44"
    GoTo LABEL_NEXT
    PROC5:
    MbeSendKeyin "LV=56"

    LABEL_NEXT:
    MbeSendKeyin "CO=0"
    MbeSendKeyin "WT=0"
    MbeSendKeyin "LC=0"
    MbeSendKeyin "RC=PROC.CEL"
    MbeSendKeyin "AC=PV"
    MbeSendCommand "/PACELR"

    End Sub

  2. #2
    Teresa Zager Guest
    Mark.Madsen@Bayercropscience.com wrote:
    Sub main


    MbeCurrentTransform.dgnUnits
    IF MbeSettings.TextLineLength = 101 THEN
    PROC1
    IF MbeSettings.TextLineLength = 102 THEN
    PROC2
    IF MbeSettings.TextLineLength = 103 THEN
    PROC3
    IF MbeSettings.TextLineLength = 104 THEN
    PROC4
    IF MbeSettings.TextLineLength = 105 THEN
    PROC5

    PROC1:
    MbeSendKeyin "LV=6"
    GoTo LABEL_NEXT
    PROC2:
    MbeSendKeyin "LV=19"
    GoTo LABEL_NEXT
    PROC3:
    MbeSendKeyin "LV=31"
    GoTo LABEL_NEXT
    PROC4:
    MbeSendKeyin "LV=44"
    GoTo LABEL_NEXT
    PROC5:
    MbeSendKeyin "LV=56"

    LABEL_NEXT:
    MbeSendKeyin "CO=0"
    MbeSendKeyin "WT=0"
    MbeSendKeyin "LC=0"
    MbeSendKeyin "RC=PROC.CEL"
    MbeSendKeyin "AC=PV"
    MbeSendCommand "/PACELR"

    End Sub
    Mark,

    I am suspicious of that series of If statements at the beginning.
    Shouldn't they look like this:

    IF MbeSettings.TextLineLength = 101 THEN GOTO PROC1
    IF MbeSettings.TextLineLength = 102 THEN GOTO PROC2
    IF MbeSettings.TextLineLength = 103 THEN GOTO PROC3
    IF MbeSettings.TextLineLength = 104 THEN GOTO PROC4
    IF MbeSettings.TextLineLength = 105 THEN GOTO PROC5

    Teresa Zager
    Bentley

  3. #3
    Guest
    On 11 Apr 2005 10:06:22 -0700, Mark.Madsen@Bayercropscience.com wrote:

    Sub main


    MbeCurrentTransform.dgnUnits
    IF MbeSettings.TextLineLength = 101 THEN
    PROC1
    IF MbeSettings.TextLineLength = 102 THEN
    PROC2
    IF MbeSettings.TextLineLength = 103 THEN
    PROC3
    IF MbeSettings.TextLineLength = 104 THEN
    PROC4
    IF MbeSettings.TextLineLength = 105 THEN
    PROC5

    PROC1:
    MbeSendKeyin "LV=6"
    GoTo LABEL_NEXT
    PROC2:
    MbeSendKeyin "LV=19"
    GoTo LABEL_NEXT
    PROC3:
    MbeSendKeyin "LV=31"
    GoTo LABEL_NEXT
    PROC4:
    MbeSendKeyin "LV=44"
    GoTo LABEL_NEXT
    PROC5:
    MbeSendKeyin "LV=56"

    LABEL_NEXT:
    MbeSendKeyin "CO=0"
    MbeSendKeyin "WT=0"
    MbeSendKeyin "LC=0"
    MbeSendKeyin "RC=PROC.CEL"
    MbeSendKeyin "AC=PV"
    MbeSendCommand "/PACELR"

    End If
    End If
    End If
    End If
    End If

    End Sub
    HTH
    Bill

  4. #4
    Guest
    carver33@bellsouth.net wrote:
    On 11 Apr 2005 10:06:22 -0700, Mark.Madsen@Bayercropscience.com
    wrote:

    Sub main


    MbeCurrentTransform.dgnUnits
    IF MbeSettings.TextLineLength = 101 THEN
    PROC1
    IF MbeSettings.TextLineLength = 102 THEN
    PROC2
    IF MbeSettings.TextLineLength = 103 THEN
    PROC3
    IF MbeSettings.TextLineLength = 104 THEN
    PROC4
    IF MbeSettings.TextLineLength = 105 THEN
    PROC5

    PROC1:
    MbeSendKeyin "LV=6"
    GoTo LABEL_NEXT
    PROC2:
    MbeSendKeyin "LV=19"
    GoTo LABEL_NEXT
    PROC3:
    MbeSendKeyin "LV=31"
    GoTo LABEL_NEXT
    PROC4:
    MbeSendKeyin "LV=44"
    GoTo LABEL_NEXT
    PROC5:
    MbeSendKeyin "LV=56"

    LABEL_NEXT:
    MbeSendKeyin "CO=0"
    MbeSendKeyin "WT=0"
    MbeSendKeyin "LC=0"
    MbeSendKeyin "RC=PROC.CEL"
    MbeSendKeyin "AC=PV"
    MbeSendCommand "/PACELR"

    End If
    End If
    End If
    End If
    End If

    End Sub

    HTH
    Bill

  5. #5
    Guest
    Thanks for your help.

Similar Threads

  1. Macro to rerun a macro
    By Wayne Tiffany in forum SolidWorks
    Replies: 5
    Last Post: 09-27-2005, 09:10 AM
  2. Something missing?
    By Martin in forum SolidWorks
    Replies: 5
    Last Post: 03-14-2005, 11:31 AM
  3. "pause" is missing
    By TCEBob in forum Customization
    Replies: 3
    Last Post: 02-28-2005, 12:09 PM
  4. menus missing
    By Lobo in forum AutoCAD
    Replies: 2
    Last Post: 02-21-2005, 07:58 PM
  5. os.shx file missing
    By dee in forum Drafting
    Replies: 1
    Last Post: 02-21-2005, 04:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum