Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

R Schmidt

@R Schmidt
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Changing cells in a event handler under Excel
    R R Schmidt

    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

    Visual Basic sharepoint debugging
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups