Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Macro Help - Jacob Skaria has previously been helping

Hi,

I had alot of help yesterday from Jacob with the following macro, but am
getting a 'run time error 13' when trying to run the macro, and i cannot see
why.

Any help much appreciated

Sub OLApp()

Dim objOL As Object, objApp As Object, lngRow As Long

Set objOL = CreateObject("Outlook.Application")

For lngRow = 9 To Cells(Rows.Count, "A").End(xlUp).Row
If Range("E" & lngRow) = "" Then
Set objApp = objOL.CreateItem(1)
With objApp
..Subject = "Change Password for system" & Range("A" & lngRow)
..Start = Range("B" & lngRow)
..ReminderPlaySound = True
..Save
End With
Range("E" & lngRow) = "Done"
End If
Next
Set objOL = Nothing
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Macro Help - Jacob Skaria has previously been helping

Please ignore, i have worked it out.

Thanks
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Macro Help - Jacob Skaria has previously been helping

Check your other post.

I dont see any reason why that should give an error.
--
Jacob (MVP - Excel)


"Dan Wood" wrote:

Please ignore, i have worked it out.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Macro Help - Jacob Skaria has previously been helping

Sorry i was being stupid again like yesterday! I simply had to change the
line .Start = Range("B" & lngRow) to the correct column!

Sorry!
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Macro Help - Jacob Skaria has previously been helping

I do have another question though.

Is there a way to automatically clear the colum 'E' if something in colom
'C' is changed?


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Macro Help - Jacob Skaria has previously been helping

Try the below..

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.


Dim varData As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then
If varData < "" And varData < Target.Value Then
Target.Offset(, 2).ClearContents
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
varData = Target.Value
End Sub

--
Jacob (MVP - Excel)


"Dan Wood" wrote:

I do have another question though.

Is there a way to automatically clear the colum 'E' if something in colom
'C' is changed?

  #7   Report Post  
Posted to microsoft.public.excel.misc
Reg Reg is offline
external usenet poster
 
Posts: 48
Default Macro Help - Jacob Skaria has previously been helping

nice !


"Jacob Skaria" wrote:

Try the below..

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.


Dim varData As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then
If varData < "" And varData < Target.Value Then
Target.Offset(, 2).ClearContents
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
varData = Target.Value
End Sub

--
Jacob (MVP - Excel)


"Dan Wood" wrote:

I do have another question though.

Is there a way to automatically clear the colum 'E' if something in colom
'C' is changed?

Reply
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
Congratulations, Jacob Skaria... מיכאל (מיקי) אבידן Excel Discussion (Misc queries) 3 April 26th 10 12:06 PM
Previously helped by Jacob Skaria -- need more help RGreen Excel Discussion (Misc queries) 1 September 1st 09 07:31 AM
Ping Jacob Skaria Fergal[_2_] Excel Worksheet Functions 2 May 26th 09 12:22 PM
How do I get macro to unmerge cells that have been previously merg HankY New Users to Excel 2 December 8th 05 05:52 AM
Can I set-up a macro to undo a previously run macro? bruatrocket Excel Discussion (Misc queries) 2 September 23rd 05 07:56 PM


All times are GMT +1. The time now is 06:24 AM.

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

About Us

"It's about Microsoft Excel"