use vba xls for ms access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahmansaputra
    New Member
    • Nov 2015
    • 6

    use vba xls for ms access

    Dear all,
    I want to link a file from the folder use vb as attach xls to ms access, if anyone can help.
    Hyperlink Directory Contents.xls
    Thank you,
    Rahman
    Attached Files
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    rahmansaputra

    Do you mean VB or VBA?
    These are related environments; however, they handle Access in very different ways; thus, the terms are not really interchangeable .

    ++
    If you want to avoid some of the VBA, one can use the Excel file by linking to the worksheet using the External Data ribbon tab and the Excel import/link option. I typically avoid importing the data using this method as there are often problems with data-type missing entries etc... Instead I'll use the linked table method.
    The other issue with this is if the workbook changes names or locations.

    There are several threads related to handling data between Excel and Access and ; however, I do want to be clear about which programming environment you are using before we get started.


    +++
    Please understand, many of us cannot or will not d/l un-requested attachments.
    In my case, such d/l are prohibited by my ITSec staff.. A practical example as to why can be found here http://bytes.com/topic/access/answer...l-ms-products. this unfortunate Member opened a file from a trusted source that resulted in all sorts of issues!

    Thus, it is preferable to have the problem clearly described in the posting text, with code and data examples (properly formatted using the [CODE/] formatting tool), and occasionally, only if needed, a screen shot/image attached using the [Advanced] post editor :)
    +++
    Last edited by zmbd; Nov 20 '15, 06:19 PM.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32653

      #3
      Just so you can understand why there is very little in the way of help here, I have no idea what it is you're asking for. Without a question that can be understood there can be no helpful answer. Maybe others can understand it better than I, but I do have some experience.

      Comment

      • hvsummer
        New Member
        • Aug 2015
        • 215

        #4
        do you want to link table into access with specify path from a folder picker ? ==

        ok, let deal with it
        I'll give you a generator code for pick up xls file from folder and link-table into access, at Access/vba insight sections

        Edit: here we go, you can find my vba code to import with some additional option here
        Last edited by hvsummer; Nov 22 '15, 08:13 AM. Reason: Input Link

        Comment

        • zmbd
          Recognized Expert Moderator Expert
          • Mar 2012
          • 5501

          #5
          Let's wait for rahmansaputra's response to our questions here before we dive in...

          Comment

          • hvsummer
            New Member
            • Aug 2015
            • 215

            #6
            @zmbd : well, I just by this change post my import/Link code to insight section too, don't worry. We're still waiting for him to give more detail.

            I think I know what he want.. he want to use vba code inside Excel file in Access, just not sure if he want to import those code from excel or want to run it as application from access.

            may be he want access to read the hyperlinks inside excel file and import those files that hyperlink lead to.

            Comment

            • zmbd
              Recognized Expert Moderator Expert
              • Mar 2012
              • 5501

              #7
              yes I understand; however, instead of guessing, which can lead to others posting with suggestions and guesses based upon other peoples guesses and suggestions in a do..loop... it's often better to wait for the reply.

              Comment

              • rahmansaputra
                New Member
                • Nov 2015
                • 6

                #8
                Thank you to all of you,
                I mean, I want to use VBA in xls can be used in ms access. How to do?

                Comment

                • hvsummer
                  New Member
                  • Aug 2015
                  • 215

                  #9
                  There are 2 way to run vba inside excel (as I know):
                  1st, you can open that excel file and runcode with vba in access
                  2nd, you can rewrite code with extra application object.

                  can you post your vba code here ? (inside [CODE] [/CODE.])

                  Comment

                  Working...