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
C

clockit

@clockit
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Excel feedback in VB6
    C clockit

    We are on the right track. This looks promising Being a newbie, how do I trigger this event or pass info to this sub once Excel has updated. Many thanks Jeremy

    Visual Basic help sysadmin beta-testing question

  • Excel feedback in VB6
    C clockit

    :(Hi all who know all I have a problem in that I need to automate an excel spreadsheet with external data sources and update the data from a remote server. Problem is, this is a standard spreadsheet which I cannot (not allowed) change yet want to read certain data from it once it has updated. Starting Excel and automating the update is not a problem (see code below). However, I need to know when the update is complete since I then have to extract specific data from this spreadsheet in my code in VB to use. How can I get feedback from Excel to say that the update is complete or alternatively pass execution to another piece of code once the update is done. "Command1_Click" section of code works fine - its the "AfterRefresh" bit thats got me stumped since it don't work!!!!!!!! The "AfterRefresh" section apparently refers to a PivotTable according to the excel Help section but I am not using a PivotTable. Any help would be GREATLY appreciated Regards Jeremy Private Sub Command1_Click() Set m_objExcel = Excel.Workbooks Dim msExcelWorkbook As String msExcelWorkbook = App.Path & "\ExcelReports\Update.xls" m_objExcel.Open msExcelWorkbook m_objExcel.Application.Visible = True m_objExcel.Application.ActiveWorkbook.RefreshAll End Sub Private Sub ActiveWorkBook_AfterRefresh(Success As Boolean) If Success = True Then m_objExcel.Application.ActiveWorkbook.Save m_objExcel.Application.ActiveWorkbook.Close m_objExcel.Application.Quit Call MsgBox("Refreshed all Data", vbOKOnly) Else ' failed or was cancelled End If End Sub

    Visual Basic help sysadmin beta-testing question
  • Login

  • Don't have an account? Register

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