Excel 2007 with 2003 issues

N

Neil Holden

Hi all gurus, i have issues with 2003 with a button, if i press a button it
will ask the user to select a cell with an email address in and it will then
email the relevant user, this works fine in 2007 but not in 2003.

Is they any code i should put in to make it compatitible with 2003?

Thanks.
 
J

Jacob Skaria

Hi Neil

Try the below macro..

--Edit the extternal workbook name and path
--Edit the destination sheet name...
--Edit the copy desitnation. Currently that is mentioned as cell A1

Sub Macro()

Dim wb1 As Workbook, wb2 As Workbook

Application.DisplayAlerts = False
Application.ScreenUpdating = False
Set wb1 = ActiveWorkbook
Set wb2 = Workbooks.Open("c:\1.xls")
wb1.Sheets("Sheet1").Range("A21:S81").Copy wb2.Sheets("Sheet1").Range("A1")
wb1.Sheets("Sheet2").Range("A21:S81").Copy wb2.Sheets("Sheet2").Range("A1")
wb2.Close True
Application.DisplayAlerts = True
Application.ScreenUpdating = True

End Sub
 
J

Jacob Skaria

Please ignore my previous post... The macro which I posted yesterday around
selecting email addresses was done in XL03
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top