How can I use Nework Resource Logon Dialog Box in a VBA script?

S

smileclick

I have written some code to check properties of a file on the network, but if
the user hasn't logged onto the server before, they recieve an error.
I'm looking for a simple way to pop the generic Windows Network Logon Dialog
Box instead of returning an error (ideally without assigning a network
drive). Then, if they successfully logon to the server, try a second time to
check the properties of the file on the restricted access network folder.
Example of my current Excel VBA code:

Private Sub CheckLastestRelease (NewestDate as Date)
Source$ = "\\mynetwork\updates\newest.xls" ' file on network server
NewestDate = FileDateTime(Source$)
MsgBox("Newest release was last modified on " & NewestDate)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top