martinargimon
Member
Morning.
I have been battling with the code below.
Whenever i pick the value of a cell address in my sheet "Orders" (via the Application.Inputbox method), i will also like to store that very same cell "address" for future use as detailed under "Stage 2" ( refer to the code below).
This program is basically designed to track "plot sales" ( land parcels). So the idea is to record the cell address of the plot ( which is the same as the cell address in the "Site Plan" sheet). Is sort of a geographically interface idea where each cell in the "SitePlan"sheet relates to a specific Land parcel, and hence once i select the cells (land parcels) in the "SitePlan" I want to record them back in the "Orders" sheet where I picked the Order number from initially.
Hope my explanation was OK?
Kindly assist. Thanks
I have been battling with the code below.
Whenever i pick the value of a cell address in my sheet "Orders" (via the Application.Inputbox method), i will also like to store that very same cell "address" for future use as detailed under "Stage 2" ( refer to the code below).
This program is basically designed to track "plot sales" ( land parcels). So the idea is to record the cell address of the plot ( which is the same as the cell address in the "Site Plan" sheet). Is sort of a geographically interface idea where each cell in the "SitePlan"sheet relates to a specific Land parcel, and hence once i select the cells (land parcels) in the "SitePlan" I want to record them back in the "Orders" sheet where I picked the Order number from initially.
Hope my explanation was OK?
Kindly assist. Thanks
Code:
Private Sub CmdbuttAssignParcel_Click()
Dim OrderNo As Range
Dim MapSheet As Range
Dim Rng As Range
'***** Copies the value from the selected cell in sheet "Orders" and pastes the contents in sheet "SitePlan" ****
'***** It also stores the cell address (where the value was first picked from), in the variable Rng for future use_
'***** under Stage 2 ( see below) ****
Sheets("Order").Activate
Set OrderNo = Application.InputBox(Prompt:="Choose Order Number to Assign to a Parcel", Type:=8)
Set Rng = OrderNo.Address
Sheets("SitePlan").Activate
Set MapSheet = Application.InputBox(Prompt:="Select Parcel/s on the Site", Type:=8)
MapSheet.Value = OrderNo.Value
'**** Stage 2 ****
'**** Selects the cell in Sheet "Orders" where the "MapSheet.Address" will be copied to ( by using "Rng" and_
'**** offest for the location) ******
Sheets("Orders").Select
Rng.Offset(0, 4).Select
ActiveCell.Value = MapSheet.Address
End Sub
Last edited by a moderator: