06. oktober 2010 - 15:44Der er
7 kommentarer og 1 løsning
Opdater links via VBA?
Hej Alle
Jeg har en simpel ontime kode, som kører hver 5 minut: Option Explicit Public dTime As Date
Sub GemProcedure() dTime = Now + TimeValue("00:05:00") Calculate ActiveWorkbook.Save Application.StatusBar = "Gemmer " + CStr(Now) 'Viser sidste Gem i statuslinien Application.OnTime dTime, "GemProcedure", , True
End Sub
Selvom denne procedure kører fint, så opdaterer den ikke de felter, som linker til en anden excelfil :( Den opdaterer kun de links når jeg åbner excelarket.
Hvad skal jeg gøre for at sikre at excel opdaterer alt (også links til andre excel filer) når jeg bruger min gemprocedure?
Jeg har tjekket options i excel og her skulle det være sat rigtigt op.
In writing VBA code for an Excel Application, the following problem has occurred: The command, "Application.Calculate", does not always update or recalculate the formulas in the cells of the workbook.
To compound this problem the users of the Excel Application are using several different versions of Excel and VBA. VBA code will need to check the version of Excel and VBA before executing a command (i.e. using Application.Version and Application.VBE.Version)
Present documentation shows the following: * F9 - recalculates all of the data in the open workbooks (Application.Calculate) * Shift+F9 - only calculates data in the specified worksheet (ActiveSheet.Calculate) * Ctrl+Alt+F9 - Forces a full calculation of the data in all of the open workbooks (Application.CalculateFull) * Ctrl+Shift+Alt+F9 - Forces a full calculation of the data in all of the open workbooks after checking the dependencies between formulas (Application.CalculateFullRebuild)
Jeg har blevet nød til at sætte VBA til at aktivere hver enkel celle for at sikre en opdatering.
Desværre fandt jeg aldrig en god løsning.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.