Hey Guys! 1st Time Posting!
An employee who works with me built some quoting software for us years ago and it will successfully save quotes on either Windows or Mac, but cannot save in Parallels using Windows 10/Excel 2016. We have it setup to access our local server for the next quote # and save into the selected customers folder on our local server. I am doubtful this will ever work because of Parallels causing the confusion, but thought I would see what you guys thought! I get the Run-time error '53' File not found below when trying to save and when I debug, below is the vba error or whatever it is called.
_____________________________________________________________________________
_____________________________________________________________________________
Greatly appreciate any/all help!!!
Thanks,
Cody
An employee who works with me built some quoting software for us years ago and it will successfully save quotes on either Windows or Mac, but cannot save in Parallels using Windows 10/Excel 2016. We have it setup to access our local server for the next quote # and save into the selected customers folder on our local server. I am doubtful this will ever work because of Parallels causing the confusion, but thought I would see what you guys thought! I get the Run-time error '53' File not found below when trying to save and when I debug, below is the vba error or whatever it is called.
_____________________________________________________________________________
Code:
Sub saveWithQuoteNumber()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.ErrorCheckingOptions.BackgroundChecking = False
Application.DisplayStatusBar = False
Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False
Dim the_name As Variant
Dim Cust As Variant
Dim dashCheck As Variant
Dim companyName As Variant
Dim the_path As Variant
Dim sep As Variant
Dim Cntr, InvoiceNumber As Integer
Dim the_path_number As Variant
Dim quotedBy As String
With ActiveSheet
If Sheets("Screen Printing").[N1] = 1 Then
MsgBox ("You must select your name in the ""Quoted by"" popup menu before you can save this quote.")
End
Else
quotedBy = Application.VLookup(Sheets("Screen Printing").[N1], Sheets("Values").[R28:T33], 3, False)
End If
Sheets("Quote Sheet").[m4] = Date
Sheets("Emb Quote Sheet").[F4] = Date
Cntr = FreeFile()
If Mid(curdir(), 2, 1) = ":" Then
the_path_number = "z:\Quotes Screen Printing\quotenumber.txt"
the_path = "z:\Quotes Screen Printing"
sep = ""
Else
the_path_number = "Server Jobs:Quotes Screen Printing:quotenumber.txt"
the_path = "Server Jobs:Quotes Screen Printing:"
sep = ":"
End If
If [D2] = "" Then
[B][COLOR=#ff0000]Open the_path_number For Input As [URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=Cntr"]#Cntr[/URL] [/COLOR][/B]
Input [URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=Cntr"]#Cntr[/URL] , InvoiceNumber
[D2] = InvoiceNumber
Close [URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=Cntr"]#Cntr[/URL]
Open the_path_number For Output As [URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=Cntr"]#Cntr[/URL]
Write [URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=Cntr"]#Cntr[/URL] , InvoiceNumber + 1
Close
End If
Cust = Sheets("Screen Printing").[A1]
If Cust <> 1 Then
companyName = Application.VLookup(Cust, Sheets("Customers").[A2:L999], 2, False)
salesPerson = Application.VLookup(Cust, Sheets("Customers").[A2:L999], 3, False)
dashCheck = InStr(1, companyName, " - ")
If dashCheck Then
the_name = the_path & Left(companyName, dashCheck - 1) & sep & [D2] & " " & Left(companyName, dashCheck - 1) & " " & salesPerson & " " & [E2] & " " & quotedBy & ".xls"
Else
the_name = the_path & companyName & sep & [D2] & " " & companyName & " " & [E2] & " " & quotedBy & ".xls"
End If
Else
the_name = the_path & "Others" & sep & [D2] & " " & [E2] & " " & quotedBy & ".xls"
End If
ActiveWorkbook.SaveAs Filename:=the_name
End With
Application.Calculate
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.ErrorCheckingOptions.BackgroundChecking = True
Application.DisplayStatusBar = True
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
End Sub
Greatly appreciate any/all help!!!
Thanks,
Cody
Last edited by a moderator: