Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default table column name with newline, cannot select with string

I have a 2010 excel table where a column name contains a newline.

While I can access this column using an index number I can't using a string.

I've tried

s = "Rotor" & vbnewline
s = "Rotor" & chr(13)

Is this possible or must the newline be remove. This newline was created
with the keycombo Alt-Enter

Fails:
ListObject.ListColumns(s).Index

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default table column name with newline, cannot select with string

I have a 2010 excel table where a column name contains a newline.

While I can access this column using an index number I can't using a
string.

I've tried

s = "Rotor" & vbnewline
s = "Rotor" & chr(13)

Is this possible or must the newline be remove. This newline was
created with the keycombo Alt-Enter

Fails:
ListObject.ListColumns(s).Index

Thank you


The result of using Alt+Enter does not insert a linefeed or carriage
return+linefeed into the cell. It merely displays the content on a new
line. That means the cell contains "Rotor" only. If you entered the
following...

Rotor
Blade

...the cell will contain "RotorBlade".

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
newline Tree*Rat New Users to Excel 9 October 21st 08 05:19 PM
Pivot Table Column Item List only specific String ricowyder Excel Discussion (Misc queries) 1 May 16th 07 02:33 PM
Add Newline(s) in a Cell Emily[_3_] Excel Programming 2 September 6th 06 04:26 AM
newline in a msgbox greenjellystar Excel Programming 7 May 10th 05 04:36 PM
"Select Column method or property not available because some/all of object doesn't refer to table" Steven Rosenberg Excel Programming 0 August 18th 03 04:41 AM


All times are GMT +1. The time now is 04:23 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"