For a Range, Name isn’t a string it’s a Name object, that you then take the Name property of to get the string:
MsgBox sampleRange.Name.Name
More Related Contents:
- How can I call a macro which contains a loop but only run one iteration of that loop?
- VBA comma separated cells, needt last entry only
- How can I find last row that contains data in a specific column?
- Open Excel file for reading with VBA without display
- Wait for shell command to complete [duplicate]
- How to return the number of dimensions of a (Variant) variable passed to it in VBA [duplicate]
- How to add a named sheet at the end of all Excel sheets?
- How to remove all non alphanumeric characters from a string except period and space in excel?
- Find last used cell in Excel VBA
- VBA general way for pulling data out of SAP [closed]
- Does Dir() make any guarantee on the order of files returned?
- Call a Sub with a String
- Assign on-click VBA function to a dynamically created button on Excel Userform
- What are .NumberFormat Options In Excel VBA?
- Excel: How to check if a cell is empty with VBA? [duplicate]
- ShowAllData method of Worksheet class failed
- Assign keyboard shortcut to run procedure
- return csv file as recordset
- Excel macro -Split comma separated entries to new rows [duplicate]
- Get text from clipboard using GetText – avoid error on empty clipboard
- Benchmarking VBA Code
- The MacScript function is not working well in Office for Mac 2016! Any ideas?
- Display milliseconds in Excel
- VBA editor auto-deletes spaces at the ends of lines
- Application.Quit command not closing the entire Excel Application
- Trying to open the workbook in separate instance
- Excel VBA – select multiple columns not in sequential order
- How to check whether certain sheets exist or not in Excel-VBA? [duplicate]
- Excel – Using COUNTIF/COUNTIFS across multiple sheets/same column
- Excel telling me my blank cells aren’t blank