Results 1 to 2 of 2
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    	'assign letters to each of the columns for comparison (fragrances, concepts)
    	Dim letter  As Long
    	letter = 65 'character 65 is the letter "A"
    	Dim l As Long
    	For l = 1 To lnglabels Step 1
    		With Cells(1, l + 2)
    			.Value = Chr(letter)
    			.HorizontalAlignment = xlCenter
    		End With
    		letter = letter + 1
    	Next l
    I'm cleaning up old code as I go.
    I single-step through the loop above, and see the letter "A" arrive in the first target cell of the Excel2000 sheet, and realize that the "Step 1" is redundant.
    Trivial, I know, but let's eliminate all unnecessary chaff that can catch the eye.
    Remember that I am doing this during execution of a loop.
    I expected to get the traditional "this will reset your program" message, as happens if I remove a DIMensioned variable during execution, but No! execution continued.
    Sort-of.
    As I single-stepped through the "Next l", the loop terminated.

    It appears that the run-time execution of the loop detects that I have tampered with the loop controls, and says "all bets are off", but somehow doesn't report it to the monitoring code that (usually) gives me an option.

    I found this odd, and post it for interest only.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='chrisgreaves' post='774526' date='10-May-2009 07:31'][/quote]
    Like this:
    I am stopped during execution, and elect to change the case of a letter in a DIMensioned variable, and learn that "This action will reset your project".
    Presumably the front-end tests for a "change in identifier character" without stopping to make it a case-insensitive test.
    I found this odd, and post it for interest only.
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •