daniels012
Well-known Member
- Joined
- Jan 13, 2005
- Messages
- 5,219
I have code below that works well most of the time. One of the cases below will not work. It insists on requiring a name and password.
(note: it is the only Windows 2000 operating systems)
I want to enter this in my case line to automatically add the username and password.
Let's say the username is: "dave" and the password is: "happy"
How can I add this to this part of the code?
Case "DJ"
strfilename = "\\DAVEJONES\DavesProposals\" & strfilename
Thank you for any help!!
Michael
(note: it is the only Windows 2000 operating systems)
I want to enter this in my case line to automatically add the username and password.
Let's say the username is: "dave" and the password is: "happy"
How can I add this to this part of the code?
Case "DJ"
strfilename = "\\DAVEJONES\DavesProposals\" & strfilename
Code:
Sub Save_and_SaveSalesman()
Dim strPath As String, strPath2 As String, CurrPath As String
Dim WB1 As Workbook
Dim WB2 As Workbook
Set WB1 = ActiveWorkbook
WB1.Save
CurrPath = WB1.Path
strfilename = Range("C6").Value & Range("O3").Value & ".xls"
strPath = "C:\Documents and Settings\Owner\My Documents\Completed Proposals\"
strPath2 = "C:\Documents and Settings\Owner\My Documents\Surface Systems\"
On Error Resume Next
On Error GoTo 0
Set WB2 = Workbooks.Open(Filename:=strPath2 & "Proposal for XL.xls")
Select Case WB1.Sheets("FRONT").Range("C2").Value
Case "MD"
strfilename = "\\MIKESRGATEWAY\MikesProposals\" & strfilename
Case "TD"
strfilename = "\\Tomsblackibm\TomsProposals\" & strfilename
Case "DJ"
strfilename = "\\DAVEJONES\DavesProposals\" & strfilename
Case "CP"
strfilename = "\\Chuckscomputer\daily\" & strfilename
End Select
WB1.SaveCopyAs Filename:=strfilename
WB1.ActiveSheet.Shapes("Button 53").Visible = False
ChDir CurrPath
Application.ScreenUpdating = True
WB1.Close
End Sub
Thank you for any help!!
Michael