"pnumminen" <(E-Mail Removed)> ha scritto nel messaggio
news:17d99667-b5c2-4331-9c67-(E-Mail Removed)...
On 7 Mar, 17:12, CurlyDave <davesex...@gmail.com> wrote:
> Try this it does what your example shows
>
> Sub Button1_Click()
> Dim s As String
> s = InputBox("What is the number")
> Range("A1") = s
> Range("B1
1").FormulaR1C1 = "=RC[-1]+20"
> Range("A1
1").AutoFill Destination:=Range("A1
20"),
> Type:=xlFillDefault
> End Sub
Actually, that doesn't work - "Syntax error".
Sub Button1_Click()
Dim s As String
s = InputBox("What is the number")
Range("A1") = s
Range("B1

1").FormulaR1C1 = "=RC[-1]+20"
Range("A1

1").AutoFill Destination:=Range("A1

20"), Type:=xlFillDefault
'<== change this line
End Sub
Look to the sintax at commented row (before last row).
Regards,
John