• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

extracting cell address in via

HI there,
I have been battling to extract the cell address and then copy it to another cell ( see code below)
The bold comments are my thought process for this , but it does not work
Could you please help.
many thanks
Regards
Martin Argimon

Code:
Private Sub CmdButAssignParcelBeneficiaries_Click()

Dim ParcelNo As Range
Dim DestinationRange As Range
 ' Dim CellAddress As Range

Sheets("SitePlan").Activate
Set ParcelNo = Application.InputBox(Prompt:="Choose cell to copy", Type:=8)
 ' CellAddress = ParcelNo.Address

Sheets("Beneficiaries_Burials").Activate
Set DestinationRange = Application.InputBox(Prompt:="Choose Destination cell", Type:=8)

ParcelNo.Copy DestinationRange
 ' CellAddress.Copy DestinationRange

End Sub
 
Last edited by a moderator:
Why copy in the last bold statement?

Might it be DestinationRange = CellAddress

I believe CellAddress is not a range in this case, it could be a string.
 
martinargimon
What do You write to each InPutBox?

You're copying inputted ParcelNo-variables value to inputted DestinationRange-value
( no matter what values are in sheets )
... or what is Your plan?
 
Hi Guys,
Thanks a lot. I have changed to the suggestion by 'GraH- Guido': .....Might it be DestinationRange = CellAddress
and it worked perfectly. !!
Thanks very much, Indeed there was NO need for a .copy method
Kind regards
Martin
 
Back
Top