Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default No characters data in Hyperlink cell

I am using xl 2003.

I have some code, allowing me to compose a cell.
If I do something like cells(1,1) = cells(1,2) & cells(1,3),
character characteristice (Bold, Italic, etc) are not copied.
I follow up the assignment by reading the inputs and copying bold, etc
to the corresponding outputs.
This does not work where an input is of the form
'=hyperlink("http://www.google.com", "Hello, World!")' or with doubling
"=hyperlink(""http://www.google.com"",""Hello, World!"")"
I have code which checks that corresponding characters actually do
correspond.
It gets "Run-time error '1004': Unable to get the Text property of the
Characters class"
if I have run
Set Src = From.Characters(Start:=1, Length:=1)
Src appears in the Locals Window as

Expression Value Type
Src Characters/Characters
+ Application Application/Application
Caption <Unable ... class String
Count 1 Long
Creator xlCreatorCode xlCreator
+ Font Font/Font
+ Parent Object/Range
PhoneticCharacters "" String
Text <Unable ... class String

<Unable ... class is a shortened version of
<Unable to get the Caption property of the Characters class

I know bold characters can't be put in the value of a hyperlink.
If you select the "H" in the "Hello, World!" above, font details go
grey.

How do I recognise such situations in code?

Obviously, I can use On Error.
I can also test the input e.g. x.formula like "=HYPERLINK*"
I would prefer to have logic which as equivalent to recognising
"<Unable to get the Caption property of the Characters class"
--
Walter Briscoe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default No characters data in Hyperlink cell

Excel won't allow you to do character by character formatting in formula cells
(or numeric cells).

On 08/17/2011 06:46, Walter Briscoe wrote:
I am using xl 2003.

I have some code, allowing me to compose a cell.
If I do something like cells(1,1) = cells(1,2)& cells(1,3),
character characteristice (Bold, Italic, etc) are not copied.
I follow up the assignment by reading the inputs and copying bold, etc
to the corresponding outputs.
This does not work where an input is of the form
'=hyperlink("http://www.google.com", "Hello, World!")' or with doubling
"=hyperlink(""http://www.google.com"",""Hello, World!"")"
I have code which checks that corresponding characters actually do
correspond.
It gets "Run-time error '1004': Unable to get the Text property of the
Characters class"
if I have run
Set Src = From.Characters(Start:=1, Length:=1)
Src appears in the Locals Window as

Expression Value Type
Src Characters/Characters
+ Application Application/Application
Caption<Unable ... class String
Count 1 Long
Creator xlCreatorCode xlCreator
+ Font Font/Font
+ Parent Object/Range
PhoneticCharacters "" String
Text<Unable ... class String

<Unable ... class is a shortened version of
<Unable to get the Caption property of the Characters class

I know bold characters can't be put in the value of a hyperlink.
If you select the "H" in the "Hello, World!" above, font details go
grey.

How do I recognise such situations in code?

Obviously, I can use On Error.
I can also test the input e.g. x.formula like "=HYPERLINK*"
I would prefer to have logic which as equivalent to recognising
"<Unable to get the Caption property of the Characters class"


--
Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default No characters data in Hyperlink cell

I am sorry to take so long to reply.

cell.formula < "" seems to test for a formula cell.

I infer that a numeric cell has a restricted range of cell.NumberFormat.
cell.NumberFormat = "@" allows character manipulation.
cell.NumberFormat = "general" sometimes allows character manipulation.

From my perspective, cell.formula = "" is an immediately adequate
criterion. I would like a solid criterion.

I find the following inconsistent in the help for range.numberformat
"The format code is the same string as the Format Codes option in the
Format Cells dialog box. The Format function uses different format code
strings than do the NumberFormat and NumberFormatLocal properties."


In message of Thu, 18 Aug 2011 06:34:01 in
microsoft.public.excel.programming, Dave Peterson
writes
Excel won't allow you to do character by character formatting in
formula cells (or numeric cells).

On 08/17/2011 06:46, Walter Briscoe wrote:
I am using xl 2003.

I have some code, allowing me to compose a cell.
If I do something like cells(1,1) = cells(1,2)& cells(1,3),
character characteristice (Bold, Italic, etc) are not copied.
I follow up the assignment by reading the inputs and copying bold, etc
to the corresponding outputs.
This does not work where an input is of the form
'=hyperlink("http://www.google.com", "Hello, World!")' or with doubling
"=hyperlink(""http://www.google.com"",""Hello, World!"")"
I have code which checks that corresponding characters actually do
correspond.
It gets "Run-time error '1004': Unable to get the Text property of the
Characters class"
if I have run
Set Src = From.Characters(Start:=1, Length:=1)
Src appears in the Locals Window as

Expression Value Type
Src Characters/Characters
+ Application Application/Application
Caption<Unable ... class String
Count 1 Long
Creator xlCreatorCode xlCreator
+ Font Font/Font
+ Parent Object/Range
PhoneticCharacters "" String
Text<Unable ... class String

<Unable ... class is a shortened version of
<Unable to get the Caption property of the Characters class

I know bold characters can't be put in the value of a hyperlink.
If you select the "H" in the "Hello, World!" above, font details go
grey.

How do I recognise such situations in code?

Obviously, I can use On Error.
I can also test the input e.g. x.formula like "=HYPERLINK*"
I would prefer to have logic which as equivalent to recognising
"<Unable to get the Caption property of the Characters class"



--
Walter Briscoe
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default No characters data in Hyperlink cell

I don't have a guess.

Maybe you could share the exact code and what is in the value of the cells that
you're concatenating.

On 08/21/2011 10:47, Walter Briscoe wrote:
I am sorry to take so long to reply.

cell.formula< "" seems to test for a formula cell.

I infer that a numeric cell has a restricted range of cell.NumberFormat.
cell.NumberFormat = "@" allows character manipulation.
cell.NumberFormat = "general" sometimes allows character manipulation.

From my perspective, cell.formula = "" is an immediately adequate
criterion. I would like a solid criterion.

I find the following inconsistent in the help for range.numberformat
"The format code is the same string as the Format Codes option in the
Format Cells dialog box. The Format function uses different format code
strings than do the NumberFormat and NumberFormatLocal properties."


In of Thu, 18 Aug 2011 06:34:01 in
microsoft.public.excel.programming, Dave Peterson
writes
Excel won't allow you to do character by character formatting in
formula cells (or numeric cells).

On 08/17/2011 06:46, Walter Briscoe wrote:
I am using xl 2003.

I have some code, allowing me to compose a cell.
If I do something like cells(1,1) = cells(1,2)& cells(1,3),
character characteristice (Bold, Italic, etc) are not copied.
I follow up the assignment by reading the inputs and copying bold, etc
to the corresponding outputs.
This does not work where an input is of the form
'=hyperlink("http://www.google.com", "Hello, World!")' or with doubling
"=hyperlink(""http://www.google.com"",""Hello, World!"")"
I have code which checks that corresponding characters actually do
correspond.
It gets "Run-time error '1004': Unable to get the Text property of the
Characters class"
if I have run
Set Src = From.Characters(Start:=1, Length:=1)
Src appears in the Locals Window as

Expression Value Type
Src Characters/Characters
+ Application Application/Application
Caption<Unable ... class String
Count 1 Long
Creator xlCreatorCode xlCreator
+ Font Font/Font
+ Parent Object/Range
PhoneticCharacters "" String
Text<Unable ... class String

<Unable ... class is a shortened version of
<Unable to get the Caption property of the Characters class

I know bold characters can't be put in the value of a hyperlink.
If you select the "H" in the "Hello, World!" above, font details go
grey.

How do I recognise such situations in code?

Obviously, I can use On Error.
I can also test the input e.g. x.formula like "=HYPERLINK*"
I would prefer to have logic which as equivalent to recognising
"<Unable to get the Caption property of the Characters class"




--
Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to validate characters within a string of data in aparticular cell Mackay Excel Discussion (Misc queries) 1 July 7th 11 03:30 PM
move data based on number of characters in a cell aileen Excel Programming 10 October 16th 08 08:53 PM
Are there equivalents of wildcard characters to use in hyperlink f caramon2000 Excel Worksheet Functions 2 November 16th 06 10:34 PM
hyperlink with more then 255 characters? Alen32 Excel Programming 1 April 12th 05 10:45 PM
Exported File truncating cell data after 255 characters Sue Rizzo Excel Discussion (Misc queries) 2 March 17th 05 08:47 PM


All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"