Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default strange vba break

What happens if you remove the error handler?

You might try fully qualifying all of your sheet references by including the
workbook

Eg:
Set objWS = ThisWorkbook.Worksheets(WKSHT_JOINED_TABLE)
instead of
Set objWS = Worksheets(WKSHT_JOINED_TABLE)

With multiple workbooks open the results using unqualified references can
sometimes be unpredictable.

Tim

"greg" wrote in message
...

So this is basically the code. I bit chunked out.
it stops on the the iMainLoop line. So strange.

I have break on unhandled errors.
thanks

----------------------------------
Sub LoadJoinedTable()
On Error GoTo PlannerError

Dim JoinedTable As Range
Dim iMainLoop As Integer

Dim objWS As Worksheet
Set objWS = Worksheets(WKSHT_JOINED_TABLE)

Set JoinedTable = objWS.Range(RANGE_JT_JOINED_TABLE)
objWS.Range(RANGE_JT_JOINED_TABLE).Worksheet.Activ ate

For iMainLoop = 1 To JoinedTable.Rows.Count
-------------------------------------


"Don Guillett" wrote in message
...
As always, post your code for comments and suggestions.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"greg" wrote in message
...
I have a very strange scenario.
I am developing a xla for excel.
The first time I open up excel and run the xla, it breaks on one
specific line.
I can press run and it goes to the end.
The next time (and every other time) I run the xla, it does not stop.
There is no breakpoint on that line.
I have even rebooted. open excel. and run the xla. and it stops in
the same place.
The sub has an on error goto, so it is not the break on unhandled
errors. But it also only stops the first time opening excel. so I don't
think this is the reason.

Anyone have any ideas on how to stop this from happening?
thanks







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
Strange Page Break behaviour while AutoFilter enabled jaymz1102 Excel Discussion (Misc queries) 0 September 9th 08 01:40 PM
XL2003 VBA: Debuging...can not break or run in break/step mode. Conan Kelly Excel Programming 1 August 23rd 08 11:51 AM
Need Help: Strange, Strange Behavior ( Not Me. My Model! ) SteveM Excel Programming 2 December 16th 07 06:02 PM
Break cell into multiple lines by line break Chia Excel Discussion (Misc queries) 1 August 20th 06 06:37 AM
Can Not Get Macro to Break with CTRL-BREAK Break Me? Excel Programming 0 September 8th 04 03:15 AM


All times are GMT +1. The time now is 10:20 PM.

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"