Look at Chip Pearson's site on Application Level events
http://www.cpearson.com/excel/appevent.htm
The application level event has an event that fires when a workbook is
created.
Private Sub xlApp_NewWorkbook(ByVal Wb As Workbook)
the xlApp portion would depend on what object was used to instantiate
application level events.
--
Regards,
Tom Ogilvy
"filo666" wrote in message
...
you forgot the must difficult one, when a new workbook is called ( I mean
when you want to start a new workbook I want to call my form) I thougt
about
auto_open, but it works just with workbooks created before no with new
workbooks
I want that when the new workbook button is pushed (or the new option in
the
file menu) my form appears.
tanks.
"JulieD" wrote:
Hi
for
2)when a user push a button in a excels sheet
- create a macro e.g.
sub runform()
userform1.show
end sub
and assign the macro to the button
3)when cells(1,1)=cells(1,2)
- put code against the worksheet_change() of the sheet e.g.
Private Sub Worksheet_Change(ByVal Target As Range)
if target.address = "$A$1" or target.address = "$B$1" then
if Range("A1").Value = Range("B1").value then
userform1.show
end if
end if
End Sub
4)when a workbook is open
- put code against the workbook_open() procedure e.g.
Private Sub Workbook_Open()
userform1.show
End Sub
if you need further information on implementing any of these please post
back.
--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"filo666" wrote in message
...
I made a form but I dont know how to run it;
I need to run it in the following cases
1)when a new workbook is called
2)when a user push a button in a excels sheet
3)when cells(1,1)=cells(1,2)
4)when a workbook is open
TIA