Hello
I would like to make an userform to chose a range of values in a sheet and then chose an other sheet from an othe workk bokk and copy the values
Printable View
Hello
I would like to make an userform to chose a range of values in a sheet and then chose an other sheet from an othe workk bokk and copy the values
Why use a form, you could so it with two simple inputboxes
[vba]
Set src = Application.Inputbox("Select range to copy FROM with mouse",Type:=8)
Set tgt = Application.Inputbox("Select first cell of range to copy TO with mouse",Type:=8)
If Not src Is Nothing And Not tgt Is Nothing Then
src.Copy rgt
End IF
[/vba]
The think id i want to copy this range in an other sheet on an other workbook
So, you select the other book in that code.
Is giving me an error
src.Copy rgt Copy method of Ranges Class Failed
It was tgt