ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   time/timing/breakpoint (2) (https://www.excelbanter.com/excel-programming/330168-time-timing-breakpoint-2-a.html)

Oskar von dem Hagen[_2_]

time/timing/breakpoint (2)
 
If it is improper to start a new thread because the first became too lengthy,
I apologize.

The two procedure that follow should behave identically - as far as I can
see - but they don't.

The first puts the actual date/time into column 49 of the actual record and
then proceeds to the next record (by "pressing" the control-button bnNext).

The second leaves column 49 empty and proceeds to the next record. (However,
a breakpoint at tbtime.value=... and a stepwise execution put the data in
column 49 and then proceed.)

I would like to understand what's happening!

Oskar von dem Hagen

Procedure 1:

Private Sub cbtime_Click()
rgData.Cells(1, 49).Value = Now()
Call bnNext_Click
End Sub

Procedure 2:

Private Sub LoadRecord()
[...]
tbtime.ControlSource = rgData.Cells(1, 49).Address()
End Sub

Private Sub cbtime_Click()
tbtime.Value = Now()
Call bnNext_Click
End Sub



All times are GMT +1. The time now is 11:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com