Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Application Path

Application Path

Scheduled Pinned Locked Moved Visual Basic
csharptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nanda1605
    wrote on last edited by
    #1

    Hi, i like to get my projects startup path in VBA, i.e., how to find the installed folder of an application. I got the code in VB.NET but my requirement is to get in VBA as macro My.Application.Info.DirectoryPath.ToString

    Thanks, Nanda

    _ T 2 Replies Last reply
    0
    • N Nanda1605

      Hi, i like to get my projects startup path in VBA, i.e., how to find the installed folder of an application. I got the code in VB.NET but my requirement is to get in VBA as macro My.Application.Info.DirectoryPath.ToString

      Thanks, Nanda

      _ Offline
      _ Offline
      _Damian S_
      wrote on last edited by
      #2

      If you are using VBA, I assume you are using MS Access. This is how to get the path for the current database in Access: Application.CurrentProject.Path Hope this helps.

      ------------------------------------------- Damian - Insert snappy one-liner here.

      1 Reply Last reply
      0
      • N Nanda1605

        Hi, i like to get my projects startup path in VBA, i.e., how to find the installed folder of an application. I got the code in VB.NET but my requirement is to get in VBA as macro My.Application.Info.DirectoryPath.ToString

        Thanks, Nanda

        T Offline
        T Offline
        Tom Deketelaere
        wrote on last edited by
        #3

        One way of doing it is the next currentdb.name this will return the full path with the database name

        N 1 Reply Last reply
        0
        • T Tom Deketelaere

          One way of doing it is the next currentdb.name this will return the full path with the database name

          N Offline
          N Offline
          Nanda1605
          wrote on last edited by
          #4

          am using MS word template, and no databases are used. pls help me in this.

          Thanks, Nanda

          T 1 Reply Last reply
          0
          • N Nanda1605

            am using MS word template, and no databases are used. pls help me in this.

            Thanks, Nanda

            T Offline
            T Offline
            Tom Deketelaere
            wrote on last edited by
            #5

            try this Dim s As String s = CurDir s = CurDir$ s = Application.Path s = ThisDocument.Path s = ActiveDocument.Path I hardly ever use word so I'm not that good at it but these seme to return serveral path's maybe one of them is what you want

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups