Need to set a Variable to the Name of Database

bconner

Registered User.
Local time
Yesterday, 20:49
Joined
Dec 22, 2008
Messages
183
I would like to set the Dim of a variable to the Name of a database.
Basically the name of the database is "Grp 11 BDR" I would like to be able to extract the "GRP 11" from the name of the database and use it in the name of an Excel file I am creating so it will look like this:
xlBook.SaveAs ("C:\Documents and Settings\Grp 11.xls")
 
Left([YourName],6) should get you there.
 
How do I initially get the name of the current database I am in using vb code?
 

Users who are viewing this thread

Back
Top Bottom