I know there is a lot questions about run-time error, but I didn't find answer for my problem. I have shared file between few people. Everybody can use this file, but ONLY one has a runtime error 1004 method range of object_global file; I checked windows settings (language and region) and we all have the same.
Line with problem:
pathfile = Range("pathfile") & "\"& Right(year, 2) & Format(period, "00") & "AC_"& entitny
Full Code:
Sub attachCommonVariables()
validated = False
period = Range("period_choose").Value
Year= Range("year_choose").Value
Entity= Range("Entity_choose").Value
pathfile = Range("pathfile") & "\"& Right(year, 2) & Format(period, "00") & "AC_"& entitny
If okres < 1 Or okres > 12 Then MsgBox "Wrong period": Exit Sub
If rok < 2007 And rok > 2020 Then MsgBox "Wrong Year": Exit Sub
validated = True
End Sub