Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default OutlineLevel and Integer Variable issue

hi all,

trying to code a routine which loops through each cell in a column and
based on the Ident Level of that cell, set the OutlineLevel of the same
Row. however after assigning the Ident Level to a Integer Variable, i am
unable to set the OutlineLevel based on the Integer Variable (all is
well if the OutlineLevel is set as a number):

Do While iStartD <= iEndD
iIdent = Worksheets(oSht.name).Range("B" &
iStartD).IndentLevel
If iIdent 8 Then iIdent = 8
Worksheets(oSht.name).Rows(iStartD).Rows. _
OutlineLevel = iIdent
iStartD = iStartD + 1
Loop

this will work (but not what i need):
Do While iStartD <= iEndD
iIdent = Worksheets(oSht.name).Range("B" &
iStartD).IndentLevel
If iIdent 8 Then iIdent = 8
Worksheets(oSht.name).Rows(iStartD).Rows. _
OutlineLevel = 2
iStartD = iStartD + 1
Loop

any help is mostly appreciated

cheers...

...jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default OutlineLevel and Integer Variable issue

Jurgen

I found the following set the level ok. The only problem was when the indent level was 0. It gave an error so make sure that the indent level is 0.

Tony

Sub fff()
Range("a11").Select
While Not IsEmpty(ActiveCell)
iIdent = ActiveCell.IndentLevel
If iIdent 8 Then iIdent = 8
If iIdent 0 Then Rows(ActiveCell.Row).Rows.OutlineLevel = iIdent
ActiveCell.Offset(1, 0).Select
Wend

End Sub

----- jurgenC! wrote: -----

hi all,

trying to code a routine which loops through each cell in a column and
based on the Ident Level of that cell, set the OutlineLevel of the same
Row. however after assigning the Ident Level to a Integer Variable, i am
unable to set the OutlineLevel based on the Integer Variable (all is
well if the OutlineLevel is set as a number):

Do While iStartD <= iEndD
iIdent = Worksheets(oSht.name).Range("B" &
iStartD).IndentLevel
If iIdent 8 Then iIdent = 8
Worksheets(oSht.name).Rows(iStartD).Rows. _
OutlineLevel = iIdent
iStartD = iStartD + 1
Loop

this will work (but not what i need):
Do While iStartD <= iEndD
iIdent = Worksheets(oSht.name).Range("B" &
iStartD).IndentLevel
If iIdent 8 Then iIdent = 8
Worksheets(oSht.name).Rows(iStartD).Rows. _
OutlineLevel = 2
iStartD = iStartD + 1
Loop

any help is mostly appreciated

cheers...

...jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default OutlineLevel and Integer Variable issue

hi Tony,

you sure hit the nail on the head - that solved the issue
thanks a million!

cheers...

...jurgenC!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
How do I add an integer to an existing integer? Aaron Excel Worksheet Functions 3 December 17th 09 09:46 PM
integer integer format Excel Worksheet Functions 1 May 3rd 07 06:45 PM
Multiple variable issue FadaSininho Excel Discussion (Misc queries) 1 August 17th 06 03:31 PM
Not seeing integer Martin Wheeler Excel Programming 1 September 4th 03 03:29 AM
Use of integer variable for sizing of matrix Cor Steeghs Excel Programming 2 August 8th 03 12:56 PM


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