J John Smith Nov 18, 2006 #1 I'm converting an old xlm file to vba. What are the vba equivalents of set.name and define.name? Thanks.
I'm converting an old xlm file to vba. What are the vba equivalents of set.name and define.name? Thanks.
B Bob Phillips Nov 18, 2006 #2 These refer to Defined Names within Excel, which in the product is created via menu Insert>Name>Define ... and provide the name, and the RefersTo value. In VBA that can be done by building the name, and then assigning a value to the range ActiveWorkbook.Names.Add Name:="Bob", RefersTo:=Range("A1") Range("Bob").Value = 123 A simpler way of defing the name is from a range Range("A1").Name = "Bob" and set the value as before -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct)
These refer to Defined Names within Excel, which in the product is created via menu Insert>Name>Define ... and provide the name, and the RefersTo value. In VBA that can be done by building the name, and then assigning a value to the range ActiveWorkbook.Names.Add Name:="Bob", RefersTo:=Range("A1") Range("Bob").Value = 123 A simpler way of defing the name is from a range Range("A1").Name = "Bob" and set the value as before -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct)
J Jim Rech Nov 18, 2006 #3 This help file has a section on VB equivalents of XL4 functions. http://www.microsoft.com/downloads/...6b-7485-437a-819b-0f446f74ed81&DisplayLang=en
This help file has a section on VB equivalents of XL4 functions. http://www.microsoft.com/downloads/...6b-7485-437a-819b-0f446f74ed81&DisplayLang=en