Click here to Skip to main content
15,903,201 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: CRC32 Pin
johnjsm29-Feb-04 1:52
johnjsm29-Feb-04 1:52 
GeneralRe: CRC32 Pin
r i s h a b h s1-Mar-04 17:08
r i s h a b h s1-Mar-04 17:08 
Generalreading from a database Pin
Anonymous25-Feb-04 4:28
Anonymous25-Feb-04 4:28 
QuestionCodeProject Champs!! Can u solve this Crystal Report Problem? Pin
Het210925-Feb-04 1:14
Het210925-Feb-04 1:14 
GeneralSOAP Prefix problem... Pin
Orkun GEDiK25-Feb-04 1:10
Orkun GEDiK25-Feb-04 1:10 
GeneralSomeone Please help Tasnim in this board!! Pin
Het210925-Feb-04 1:09
Het210925-Feb-04 1:09 
GeneralRe: how to create a table in sql server database by using visual basic Pin
steff kamush25-Feb-04 6:15
steff kamush25-Feb-04 6:15 
GeneralChanging cells in a event handler under Excel Pin
R.Schmidt24-Feb-04 22:22
R.Schmidt24-Feb-04 22:22 
Hello,

I programmed a click event handler for a button on a worksheet. In this handler I wanted to change some cells. But when the handler changed the first cell it aborted directly after the comand.

Here's my code:

This is the event handler itself, it is calling another function that is doing the work:

Private Sub bReorgWorkTime_Click()
ReorgWorkTime bReorgWorkTime.Parent
End Sub

Public Function ReorgWorkTime(xButtonWorksheet As Worksheet)
Dim iDay As Integer
Dim xWorkTime As Variant
Dim xReorgedTime As Variant
Dim dWorkTime As Double
Dim bOldEventsEnabled As Boolean

iDay = ROW_DAY_1

bOldEventsEnabled = Application.EnableEvents
Application.EnableEvents = False

' Fill in all days without over times:
While (iDay <= ROW_DAY_31)
xWorkTime = xButtonWorksheet.Cells(iDay, COL_WORKED_TIME)

If (IsNumeric(xWorkTime) And Not IsEmpty(xWorkTime)) Then
dWorkTime = xWorkTime
xButtonWorksheet.Cells(iDay, COL_REORGED_TIME) = dWorkTime
' Aborts here
Else
xButtonWorksheet.Cells(iDay, COL_REORGED_TIME) = ""
' or here
End If
iDay = iDay + 1
Wend

Application.EnableEvents = bOldEventsEnabled
End Function

Believing the debugger the "iDay = iDay + 1" line isn't even reached!

I use Excel 2002 SP-1 German

GeneralConvert heximal Pin
erikkloeze24-Feb-04 21:46
erikkloeze24-Feb-04 21:46 
GeneralRe: Convert heximal Pin
jzsmith3324-Feb-04 22:18
jzsmith3324-Feb-04 22:18 
GeneralRe: Convert heximal Pin
Matthew Hazlett24-Feb-04 22:33
Matthew Hazlett24-Feb-04 22:33 
GeneralRe: Convert heximal Pin
erikkloeze24-Feb-04 23:14
erikkloeze24-Feb-04 23:14 
GeneralRe: Convert heximal Pin
Dave Kreskowiak25-Feb-04 7:06
mveDave Kreskowiak25-Feb-04 7:06 
Generalunable to shutdown my computer with WMI Pin
yangchengmin24-Feb-04 21:44
yangchengmin24-Feb-04 21:44 
GeneralRe: unable to shutdown my computer with WMI Pin
John Kuhn25-Feb-04 10:54
John Kuhn25-Feb-04 10:54 
GeneralPlz help : Unable to Attach Msm file for .net framework Pin
Tasnim24-Feb-04 21:20
Tasnim24-Feb-04 21:20 
GeneralMDAC Merge Module Installation Pin
Tasnim24-Feb-04 18:50
Tasnim24-Feb-04 18:50 
GeneralDeployment of Crystal Report in VB.net(From where shud I get KeyCode) Pin
Tasnim24-Feb-04 18:48
Tasnim24-Feb-04 18:48 
GeneralString from vb to VC Pin
SiddharthAtw24-Feb-04 18:08
SiddharthAtw24-Feb-04 18:08 
GeneralRe: String from vb to VC Pin
John Kuhn24-Feb-04 18:14
John Kuhn24-Feb-04 18:14 
GeneralRe: String from vb to VC Pin
SiddharthAtw26-Feb-04 19:10
SiddharthAtw26-Feb-04 19:10 
GeneralRe: String from vb to VC Pin
Dave Kreskowiak27-Feb-04 4:21
mveDave Kreskowiak27-Feb-04 4:21 
GeneralRe: String from vb to VC Pin
John Kuhn27-Feb-04 5:26
John Kuhn27-Feb-04 5:26 
GeneralRe: String from vb to VC Pin
Matthew Hazlett24-Feb-04 21:28
Matthew Hazlett24-Feb-04 21:28 
GeneralRe: String from vb to VC Pin
Dave Kreskowiak25-Feb-04 6:47
mveDave Kreskowiak25-Feb-04 6:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.