Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determine cell Indent level?

Want to set a variable equal to the indent level of text in a certain cell.
How can I do this in VBA within Excel?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Determine cell Indent level?

intLevel = Range("A1").IndentLevel

If this post helps click Yes
---------------
Jacob Skaria


"drvmark" wrote:

Want to set a variable equal to the indent level of text in a certain cell.
How can I do this in VBA within Excel?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Determine cell Indent level?

Use the .Column property as below

Sub Mac()

Dim fld1, fld2 As Range

Set fld1 = Range("A5")
Set fld2 = Range("F5")

MsgBox fld2.Column - fld1.Column

End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"drvmark" wrote:

Want to set a variable equal to the indent level of text in a certain cell.
How can I do this in VBA within Excel?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Determine cell Indent level?

Oops. Sorry. The below is a wrong post///
--
If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Use the .Column property as below

Sub Mac()

Dim fld1, fld2 As Range

Set fld1 = Range("A5")
Set fld2 = Range("F5")

MsgBox fld2.Column - fld1.Column

End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"drvmark" wrote:

Want to set a variable equal to the indent level of text in a certain cell.
How can I do this in VBA within Excel?

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
Determine next level from a table theone29opn Excel Discussion (Misc queries) 2 August 1st 08 03:38 AM
INDENT TEXT IN A CELL Fran Excel Discussion (Misc queries) 3 August 10th 07 01:32 PM
Macro to Outline based on Indent Level [email protected] Excel Programming 3 April 13th 07 08:30 PM
How can I remove an indent within a cell? DB--less than excel expert Excel Discussion (Misc queries) 5 February 17th 06 08:15 PM
How can I query the 'indent' level of text in a cell? NJDevil Excel Programming 10 October 12th 05 04:46 PM


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