LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Weird Behaviour Function not invoked

I see a weird behaviour in VBA code, not always but from time to time.
I've seen this in more than one workbook, so I'd like to know how to fix it.

Having (line numbers are just for explanation purposes)
001 For each cel in range("rTotal")
002 cel.offset(0,2)="x"
003 Next
.....
.....
100 Function anYthing( xLOL as string) as string
101 Application.Volatile True
102 Sheets("STAT").Select
103 Range("lVAL").Select
104 Sw = Sw + 1
105 If Sw 250 Then
106 MsgBox ("Times: " + Str(Sw))
107 End If
108 anYthing="anything"
109 Function End


While normal flow would be looping through steps 1 -2 -3 some times I can
see (while debugging) that flow is 1 - 2 - and looping (several times) steps
103 104 - 100, which is a function actually not invoked.
Eventually it goes back to 3-2-1

Any clue?

Sharon
 
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
Weird VBA Behaviour msnyc07 Excel Worksheet Functions 13 February 15th 10 08:04 AM
Weird WindowsMediaPlayer behaviour teepee[_3_] Excel Discussion (Misc queries) 1 October 26th 08 11:20 PM
weird behaviour from combo box medic Excel Programming 2 June 6th 08 07:02 AM
Weird Behaviour of Code Carlo Excel Programming 11 November 9th 06 11:55 AM
Weird Cell Behaviour Matt[_33_] Excel Programming 14 October 18th 05 06:42 PM


All times are GMT +1. The time now is 09:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"