filipivanovic
Board Regular
- Joined
- Oct 25, 2013
- Messages
- 54
Hi, i have problem with macro but can not figure out what is the problem. This is macro:
Sub GoTo_Material()
Path = "C:\Users\rsivafil\Documents\MRP Obuka\MRP01\"
Row = ActiveCell.Row
mat_index = Range("a" & Row).Value
mat_name = Range("b" & Row).Value
file_name = Path & "MRP_" & mat_index & "_" & mat_name & ".xls"
On Error GoTo kupa
Workbooks(file_name).Activate
Exit Sub
kupa:
Workbooks.Open (file_name)
End Sub
What can be done ?
Sub GoTo_Material()
Path = "C:\Users\rsivafil\Documents\MRP Obuka\MRP01\"
Row = ActiveCell.Row
mat_index = Range("a" & Row).Value
mat_name = Range("b" & Row).Value
file_name = Path & "MRP_" & mat_index & "_" & mat_name & ".xls"
On Error GoTo kupa
Workbooks(file_name).Activate
Exit Sub
kupa:
Workbooks.Open (file_name)
End Sub
What can be done ?