Hiya
I have macro that brings information from outlook to excel. In the beginning of macro, it deletes range of cells. That destroys the functions that target those cells. Is there a way avoid that? Using some different method or ?
Running the macro messes up all funtions that targets those cells.
Like:
PS. This really great code to get data from outlook is orginally: http://www.codeforexcelandoutlook.com/blog/2008/08/extract-calendar-data-from-outlook-into-excel/
Thank you!
I have macro that brings information from outlook to excel. In the beginning of macro, it deletes range of cells. That destroys the functions that target those cells. Is there a way avoid that? Using some different method or ?
Code:
Dim olApp As Outlook.Application
Dim olNS As Outlook.Namespace
Dim myCalItems As Outlook.Items
Dim ItemstoCheck As Outlook.Items
Dim ThisAppt As Outlook.AppointmentItem
Dim MyItem As Object
Dim StringToCheck As String
Set Mybook = Excel.Workbooks.Open("C:\Temp\name.xlsx")
[B]Sheets("data").Select[/B]
[B] Range("A1:G2000").Select[/B]
[B] Selection.Delete Shift:=xlToLeft[/B]
Workbooks("name.xlsx").Close SaveChanges:=True
Running the macro messes up all funtions that targets those cells.
Like:
Code:
=DATEVALUE(MID(data![B]#REF[/B]!;4;2)&"."&LEFT(data![B]#REF[/B]!;2)&"."&RIGHT(data![B]#REF[/B]!;2))
PS. This really great code to get data from outlook is orginally: http://www.codeforexcelandoutlook.com/blog/2008/08/extract-calendar-data-from-outlook-into-excel/
Thank you!