ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Use VB macro in excel 2007 to Iseries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: Use VB macro in excel 2007 to Iseries

    Code:
    Cmd.CommandText = "SELECT * from lib[COLOR="red"][B][SIZE="6"].[/SIZE][/B][/COLOR]file "
    Use dot instead of slash between lib and file to qualify. You must use the *SQL naming not the *SYS naming when running VBA.
    Philippe

    Comment


    • #17
      Re: Use VB macro in excel 2007 to Iseries

      Originally posted by Mercury View Post
      Code:
      Cmd.CommandText = "SELECT * from lib[COLOR="red"][B][SIZE="6"].[/SIZE][/B][/COLOR]file "
      Use dot instead of slash between lib and file to qualify. You must use the *SQL naming not the *SYS naming when running VBA.
      Yeah, what he said.
      "Time passes, but sometimes it beats the <crap> out of you as it goes."

      Comment


      • #18
        Re: Use VB macro in excel 2007 to Iseries

        HI Mercury and littlepd

        Thank you so much, It works fine,

        Btw, Does any one has the thread has more complicate sql statement, I just want to study.

        Thank you for your help.

        Comment


        • #19
          Re: Use VB macro in excel 2007 to Iseries

          Originally posted by Mercury View Post
          Have you created a worksheet named "Download" in the Excel file or folder like I said in my latter post ?

          See attached thumbnails.
          Hi Mercury and All

          Now I can do alot of reports from VB marco follow your instruction
          However, I have 2 point need your help :

          1. If I run report i want the program automatic open excel application with the new workbook , then program write data in here ,
          User can save this file if they want.
          2. From the excel file I want to call VB form to re-run report , do not want to reopen again excel file, because in current i set automatic call form if i open excel file .

          Private Sub Workbook_Open()
          FrmMaster.Show

          End Sub


          Thank you so much for your help.

          Comment


          • #20
            Re: Use VB macro in excel 2007 to Iseries

            Not sure to understand. Can you pls clarify ?
            Philippe

            Comment


            • #21
              Re: Use VB macro in excel 2007 to Iseries

              I've never had an occasion where I needed to open a workbook from a program executing on i, so I can't help you with that one. However, I can help you with re-running you VBA macro.

              The answer depends on which version of Excel you're running. Anything "pre-ribbon" (before Excel 2007) you should have a menu option (either "Tools" or "Data", I cant' remember) that drops down to reveal a Macros sub-menu. On the sub-menu, there is an option to display a list of existing macros. Find the one you want and double-click it.

              If you're using a "ribbonized" excel, click the "View" tab on the ribbon. you should see a big button on the right labeled "Macros". Click it. It opens up the same list box with all your macros in it. Double-click the one you want to run.

              If you want a short cut, you can add a button onto your worksheet and assign the macro in question to your button.
              "Time passes, but sometimes it beats the <crap> out of you as it goes."

              Comment


              • #22
                Re: Use VB macro in excel 2007 to Iseries

                Hi Merry

                I will post this theard to excel forum , just is excel technical ,

                Thank you so much for your help, Thanks for this room also

                Comment

                Working...
                X