I have a name that contains this, for example:
=(B1;C3;E4)
It is stored with the name, "Cells1".
I want to take those cells using VBA and work with them, and change their cell value. I have the following code:
Sub Vaciar_nombres()
Dim R1 As
REM Following line throws a 1004 error.
Set R1 = test_sheet.Names("Cells1").RefersToRange
Debug.Print (VarType(R1))
End Sub
I tried using a Range type variable. It throws a 1004 error.
Also, I don't know if I have to write those cells in that name like:
=(B1;C4;C5) OR =B2;C4;C5
Don't take into account the semicolon notation, in my language, it is written like that when I create a name and select different cells using the Ctrl key.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.