Have you inadvertantly disabled events?
Copy this to Immediate Window
Application.EnableEvents = True and hit Enter
Gord
On Sat, 28 Nov 2009 00:59:01 -0800,
(E-Mail Removed) uk
<(E-Mail Removed)> wrote:
>i have tried all the codes that you have suggested and i still cant get it to
>work
>
>"Dave Peterson" wrote:
>
>> Include the drive and path, too:
>>
>> Workbooks.Open("c:\my folder\my other folder\data.xls")
>>
>> (change as appropriate)
>>
>> (E-Mail Removed) uk wrote:
>> >
>> > this is a code from MACROS MADE EASY
>> >
>> > Sub Workbook_Open()
>> > Workbooks.Open("data.xls")
>> > End Sub
>> >
>> > "Gord Dibben" wrote:
>> >
>> > > Not if you did not add more to it.
>> > >
>> > > Show us the code you tried that does not work.
>> > >
>> > >
>> > > Gord Dibben MS Excel MVP
>> > >
>> > > On Thu, 26 Nov 2009 09:20:01 -0800, (E-Mail Removed) uk
>> > > <(E-Mail Removed)> wrote:
>> > >
>> > > >hi i have tried the code that you recommended but i cannot get it to work
>> > > >
>> > > >"Dave Peterson" wrote:
>> > > >
>> > > >> dim wkbk2 as workbook
>> > > >> set wkbk2 = workbooks.open(filename:="c:\somefilename.xls")
>> > > >>
>> > > >>
>> > > >> (E-Mail Removed) uk wrote:
>> > > >>
>> > > >> --
>> > > >>
>> > > >> Dave Peterson
>> > > >> .
>> > > >>
>> > >
>> > > .
>> > >
>>
>> --
>>
>> Dave Peterson
>> .
>>