VBA how to paste in differente cell everytime i used the macro

Viewed 15

im trying to make dynamic the paste, what i need is to pass a variable in To do something like this:

myValue = InputBox("A7")
Range("myValue").Select

OR if somebody can tell me another way to approach this im open to suggestions: (per example i was looking selecting a cell before running the macro but is not working, if somebody can give me any idea i will appreciate it thanks)

so far this is my code:

Sub copy_relative()

Sheets("Call Detail Record").Select
Range("D5:F27").Select
Selection.Copy
Sheets("CallDetailRecord").Select
Range("W7").Select   ' this is the value that i want  to change 
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    

End Sub

0 Answers
Related