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: 22
Default activating workbooks

I am trying to put some code together where I can copy a list of dates from
one file to another if they are different with the destination file name
having part of the file name varying from month to month.
This is what I have got so far but I get the message subscript out of range.

Sub Update_Ethane_Email_File()
If MthNum < 10 Then
Workbooks.Open Filename:="M:\KOLOPSMB\Post Conversion Files\Current
Year\0" & MthNum & " " & Left(MthName, 3) & " Data.xls", _
UpdateLinks:=0
Else
Workbooks.Open Filename:="M:\KOLOPSMB\Post Conversion Files\Current
Year\" & MthNum & " " & Left(MthName, 3) & " Data.xls", _
UpdateLinks:=0
End If
Workbooks.Open Filename:="M:\KOLOPSMB\Weekly and Monthly Emails\Ethane
Transfer Data " & MthName & ".xls", _
UpdateLinks:=0
Range("A5").Select
If ActiveCell.Value < DayOne Then
Windows("Create Email Notifications.xls").Activate
Range("Date_Field").Select
Selection.Copy
Windows("Ethane Transfer Data " & MthName & ".xls").Activate

End If
End Sub

Appreciate any help.

Thanks
Ray
 
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
Activating links Tellu Excel Discussion (Misc queries) 2 August 25th 08 10:14 AM
Activating Function Nat Excel Worksheet Functions 7 September 27th 06 07:54 AM
Activating a Checkbox Lucille Excel Worksheet Functions 0 April 28th 06 06:22 PM
List box not activating sue74 Excel Discussion (Misc queries) 0 November 8th 05 01:34 PM
Activating a Hyperlink Jeremy S Excel Discussion (Misc queries) 3 July 3rd 05 02:15 AM


All times are GMT +1. The time now is 06:43 PM.

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"