Range Variable show value of it in basic format

GerrardSVK

New Member
Joined
Sep 18, 2023
Messages
29
Office Version
  1. 2016
Platform
  1. Windows
Hi everyone,

Is there any possibilty to simply write value of range variable into cell? See my code

VBA Code:
Dim SpecifiedRange As Range

Set SpecifiedRange = Application.InputBox("Označ myšou v exeli z 3D rozsah kopírovania pre 1 kartu", Type:=8)

Dim Range1K As String

Range1K = SpecifiedRange.AddressLocal

Workbooks(1).Sheets(1).Range("C10").Value = Range1K

This Code will write down into cell C10 the range which I selected by mouse for this case Its A1:D4 see below.

$A$1:$D$4

But I need to put this information but not in format like this but just In format A1:D4
So In cell C10 after running the code will be writen A1:D4 instead of
$A$1:$D$4

Can anyone help?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Try
Rich (BB code):
Range1K = SpecifiedRange.AddressLocal(0, 0)
 
Upvote 0
Solution

Forum statistics

Threads
1,224,746
Messages
6,180,704
Members
452,994
Latest member
Janick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top