L
Lars Kofod
Can anyone tell my what's wrong with the following:
lRaekke = ActiveCell.Row
dVSLoen = Cells(lRaekke, 9).Value
Debug.Print lRaekke, dVSLoen
sTimeAdresse = Cells(lRaekke, 7).Address
sEgenLoenAdresse = "Tilbudsoplysninger!" + Worksheets
("TilbudsOplysninger").Range("EgenLoen").Address
'=+Hvis(EgenLoen>0;+Timer*EgenLoen;V&S løn)
sFormel = "=+Hvis(EgenLoen>0;" + "+" + sTimeAdresse + "*"
+ "EgenLoen;" + "+" + CStr(dVSLoen) + ")"
Debug.Print sFormel '=+Hvis(EgenLoen>0;+$G$34*EgenLoen;+0)
ActiveSheet.Cells(lRaekke, 9).Formula = sFormel
It keeps failing at the last line: RT error 1004:
Programdifined or Objectdifined Error
Thanks
Lars Kofod
lRaekke = ActiveCell.Row
dVSLoen = Cells(lRaekke, 9).Value
Debug.Print lRaekke, dVSLoen
sTimeAdresse = Cells(lRaekke, 7).Address
sEgenLoenAdresse = "Tilbudsoplysninger!" + Worksheets
("TilbudsOplysninger").Range("EgenLoen").Address
'=+Hvis(EgenLoen>0;+Timer*EgenLoen;V&S løn)
sFormel = "=+Hvis(EgenLoen>0;" + "+" + sTimeAdresse + "*"
+ "EgenLoen;" + "+" + CStr(dVSLoen) + ")"
Debug.Print sFormel '=+Hvis(EgenLoen>0;+$G$34*EgenLoen;+0)
ActiveSheet.Cells(lRaekke, 9).Formula = sFormel
It keeps failing at the last line: RT error 1004:
Programdifined or Objectdifined Error
Thanks
Lars Kofod