LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Macro Help Requires

I have two macros to run when somebody changes my excel sheet. The first one
is assigned to a button, and just checks the spreadsheet for field "A/L" :-

Sub RunIf()
For Each c In Range("C3:F14")
If c.Value = "A/L" Then
Call Add_Appointment
End If
Next
End Sub

Question 1) Will this script look at every field from c3 to f14 eg c3, c4,
c5, c6 etc.

Question 2) Is there a way to update this script to only pick up amendments,
or will this need to be in my second macro?

My second macro creates an appointment within outlook calender:-

Sub Add_Appointment()
Dim myOlapp As Object
Dim myitem As Object

Set myOlapp = CreateObject("Outlook.Application")
Set myitem = myOlapp.createitem(1)

With myitem
.Body = "Annual Leave"
'.Duration = dur'
.AllDayEvent = True
.Subject = Range("C1").Value & " - A/L"
.Save

End With

Set myitem = Nothing
Set myOlapp = Nothing

End Sub

Question 3) How can i get the subject to look at a range of c1 if a cell in
column c has been changed, eg range d1 if d7 has been changed, range g1 if
g13 has been changed?

Question 4) How can i specifiy which calender needs updating?

Any answers to the questions are much apprecitated.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
novice requires help with vlook up [email protected] Excel Discussion (Misc queries) 1 March 22nd 07 07:19 PM
"AutoPrint" type macro requires tweaking 1drunkbrit Excel Discussion (Misc queries) 0 August 24th 05 08:04 PM
Creating new series requires div cell val by itself . How to do t. Texastom Excel Discussion (Misc queries) 1 March 21st 05 10:36 PM
Hiding Personal.xls Requires Exit Twice Kay Excel Worksheet Functions 2 March 7th 05 02:05 PM
question requires answer [email protected] Excel Worksheet Functions 2 February 6th 05 10:44 AM


All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"