autorun run external macro

How is it possible to run a macro in  another .mvba from the Autorun

I have added some commands: in the Autorun

CadInputQueue.SendCommand "View Off All" 'Turn off all views
CadInputQueue.SendCommand "View On 1" 'Turn View 1 on
CadInputQueue.SendCommand "Window Tile" 'Resize View 1 to fit screen
CadInputQueue.SendCommand "Fit All" 'Start Fit All command
CadInputQueue.SendCommand "Selview 1" 'Apply to View 1

These all work, what I wanted to add was a Macro from Name.mvba and I know it is Module6.SetDefaults        

I can run the macro from the key-in command vba run SetDefaults and it works fine, but I was hoping to add it to the autorun

and eliminate extra commands

Parents Reply Children
  • Jon, thank you for the reply

    Is this where I add the above statements ?

    Really was uncertain where to place the answer you were nice enough to answer. Perhaps I should have name(no ext) and the

    statement above 

    Dim keyIn As String
    keyIn = "vba run [Name]Module6.SetDefaults"
    CadInputQueue.SendKeyin keyIn
    Oh, Jon I went ahead and put just RUN VBA RJBP(Which is the name)Module6.setdefaults"
    i HAD ADDED THE Message line and it put Ran AutoRun.mvba but nothing fromModule
    Tried Dim KeyIn As String
    KeyIn = "VBA RUN [RJBP]Module6.SetSDFpreferences"
    CadInputQueue.SendKeyin KeyIn
    I even tried VBA RUN RJBP.Module6.SetSDFpreferences"
    Each time am getting error message VBA INTERFACE error:

    I also move the commands below yours:

    When you can spare me some mover of your valuable time, I would appreciate or anyone else who wants to come in













    Version: MicroStation V8i SS 10

    RJB Phillips III (Richard) Praise the Lord for His Mercy and grace in Christ Jesus

  • Jon It is working I noticed the computer was referring to my RJBP.MVBA  as default when I sent the last picture

    went back and change [name] to [default] it came up with DGNSET loaded checked the settings>Design File Settings

    and they were all done, so appreciate so much for the assistance. Email me sometime, I put up a question on you business page

    trying to get a price on something. My email (this would not be a company purchase) I will have to personally pay you

    any way rjbphillipsiii1945@gmail.com  I hope this is not a violation just asking someone to contact you? If it is very sorry.

    Version: MicroStation V8i SS 10

    RJB Phillips III (Richard) Praise the Lord for His Mercy and grace in Christ Jesus