Re: How to format text in the cell, so the end of text will be visible?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Dave, I cannot use menu bar.
I am doing automation from my vbasic application.
moExcelWS.Rows(1, 1).Insert.Comment = "text"
does not work.
Can you show me how, please?
And how to retrieve that comment?

Also, I've found .SmartTags property.
How to use that?
Thanks,
Jack

"Dave Peterson" <petersod@xxxxxxxxxxxxxxxx> wrote in message
news:45E24361.9E06AB0@xxxxxxxxxxxxxxxxxxx
What did you see when you hid a column?

Maybe you could use a comment (Insert|Comment from the menubar)?



Jack wrote:

If I hide the column will the numbering of columns change?
I need the original columns numbers stay intact.
I wonder, maybe there is .tag property I can use instead of hidden
column?
Jack

"Dave Peterson" <petersod@xxxxxxxxxxxxxxxx> wrote in message
news:45E2323B.6ABCC5B7@xxxxxxxxxxxxxxxxxxx
I would think the first would be pretty difficult--unless you used a
fixed
width
font and made the columnwidth just wide enough to show the name of the
file.

The second sounds easier. You can hide a column in excel.

Record a macro when you select a cell in the column to hide.
Format|Column|Hide

You'll end up with something like:

Range("E1").EntireColumn.Hidden = True



Jack wrote:

That's work. Thank you.
But still I am not satisfied with the result.
I am thinking about a different approach.
The cell contains full path and the file name.
And I am doing Excel automation, so my code is visual basic
application
which controls Excel sheet.
Perfectly, I would like to have the following:
1.
make column( or cell) width autofit and display only title of the
file.
2.
Create invisible column (I presume that it is possible) with
corresponding
cells, which will store the path to that file.

How can I do that?

Thanks,
Jack

"Dave Peterson" <petersod@xxxxxxxxxxxxxxxx> wrote in message
news:45E221C8.23688CC@xxxxxxxxxxxxxxxxxxx
Try changing the horizontal alignment manually just to see if that
works
for
you.

If you record a macro when you do it, you'd see something like:

moExcelWS.Cells(2, 3).HorizontalAlignment = xlRight

Jack wrote:

I have tried that.
When I do:
moExcelWS.Cells(2, 3).Justify = 1
the displayed text stretches over the 3 next cells below in the
same
column!!!!
and Excel displays message:
"Text will extend below selected range"

I need to display only end of the text in the cell and because I do
automation I do not want any Excel messages to pop up.
Jack

"Dave Peterson" <petersod@xxxxxxxxxxxxxxxx> wrote in message
news:45E217A2.6A54F477@xxxxxxxxxxxxxxxxxxx
Maybe you can justify the text to the left?

But if there's something in the cell to the left, you won't see
the
leading
text.


Jack wrote:

In visual basic:
When the textbox is smaller than the text, to display the last
part
of
the
text I do:
txtWaveFile.SelStart = Len(txtWaveFile.Text)

How can I do the same for the particular cell?

I have tried:
moExcelWS.Cells(1, 2).Text.sellstart = Len(moExcelWS.Cells(1,
2).Text)

but that of course is wrong.

Jack

--

Dave Peterson

--

Dave Peterson

--

Dave Peterson

--

Dave Peterson


.



Relevant Pages

  • Re: Scary
    ... Dave involved, there's not much for me to add. ... That is, Excel is operating properly ... another cell exactly. ... Dean wrote: ...
    (microsoft.public.excel.programming)
  • Re: filtering
    ... I've never seen excel behave this way. ... My guess is that you actually have something else in that cell cell that's ... And if you add those double quotes to the cell with the names, ... dave glynn wrote: ...
    (microsoft.public.excel.misc)
  • Re: CELL FORMATTING WILL NOT WORK
    ... Thanks again, Dave. ... When I type the first column below into an Excel spreadsheet, the second column is the result of ISNUMBER: ... If I then reformat that cell with any Date format or a Custom format that is a date, it is formatted as instructed, but it appears as 1/9/08 or 1 September 2008 etc NOT 10 June 2008!! ... and any date formatting applied to that cell has no effect. ...
    (microsoft.public.excel.misc)
  • Re: Can I split&write data to each individual sheet?
    ... Jack wrote: ... >> Dim sh As Worksheet, cell As Range, rng As Range ... >> Exit Sub ... Dave Peterson ...
    (microsoft.public.excel.programming)
  • Re: How to use the same picture in multiple cells?
    ... I like that Dave. ... I put this in B1 and formatted that cell as Wingdings: ... I have an excel sheet that is being used to rate a number of questions ... numerical range, and what I need to do is have another column that ...
    (microsoft.public.excel.misc)