Hello, I'm having a heck of an issue with this. I'm using a form that I created in excel that has a command button. When the command button is clicked it then creates a new worksheet thats identical to the form and saves with its own #. It also calls up a masterspreadsheet that each document can be viewed by a hyperlink...this is when the coding below starts. My problem is where the code begins:
Set MasterList = Workbooks.Open("C:\jobtest\JobOrderMasterList.xlsm")....I'm constantly getting a timeout error in this section. If I could get some advice on this that would be great! Below is the script that I'm using:
'Updates Job Orders Masterlist
Dim CreationDate As Date
Dim JobOrder As String
Dim CompanyName As String
Dim Jobtype As String
Dim MasterList As Workbook
Dim strFolder As String
Worksheets("Quote").Select
CreationDate = Range("H3")
JobOrder = Range("J10")
Worksheets("Quote").Select
CompanyName = Range("B3")
Worksheets("Quote").Select
Jobtype = Range("B3")
strFolder = "C:\jobtest\Quote" & JobOrder & ".xlsm"
Set MasterList = Workbooks.Open("C:\jobtest\JobOrderMasterList.xlsm")
Worksheets("Quote").Select
Worksheets("Quote").Range("A1").Select
RowCount = Worksheets("Quote").Range("A1").CurrentRegion.Rows.Count
With Worksheets("Quote").Range("A1")
.Offset(RowCount, 0) = CreationDate
.Offset(RowCount, 1) = JobOrder
.Offset(RowCount, 2) = CompanyName
.Offset(RowCount, 3) = Jobtype
.Offset(RowCount, 1).Activate
End With
ActiveCell.Hyperlinks.Add ActiveCell, strFolder
MasterList.Save
MasterList.Close
Set MasterList = Workbooks.Open("C:\jobtest\JobOrderMasterList.xlsm")....I'm constantly getting a timeout error in this section. If I could get some advice on this that would be great! Below is the script that I'm using:
'Updates Job Orders Masterlist
Dim CreationDate As Date
Dim JobOrder As String
Dim CompanyName As String
Dim Jobtype As String
Dim MasterList As Workbook
Dim strFolder As String
Worksheets("Quote").Select
CreationDate = Range("H3")
JobOrder = Range("J10")
Worksheets("Quote").Select
CompanyName = Range("B3")
Worksheets("Quote").Select
Jobtype = Range("B3")
strFolder = "C:\jobtest\Quote" & JobOrder & ".xlsm"
Set MasterList = Workbooks.Open("C:\jobtest\JobOrderMasterList.xlsm")
Worksheets("Quote").Select
Worksheets("Quote").Range("A1").Select
RowCount = Worksheets("Quote").Range("A1").CurrentRegion.Rows.Count
With Worksheets("Quote").Range("A1")
.Offset(RowCount, 0) = CreationDate
.Offset(RowCount, 1) = JobOrder
.Offset(RowCount, 2) = CompanyName
.Offset(RowCount, 3) = Jobtype
.Offset(RowCount, 1).Activate
End With
ActiveCell.Hyperlinks.Add ActiveCell, strFolder
MasterList.Save
MasterList.Close