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
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
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" <[email protected]> wrote in message
news:[email protected]...
>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
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" <[email protected]> wrote in message
> news:[email protected]...
> >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
>
>
>
i didn't forget it ... i was leaving it for someone else, but you're welcome
anyway
--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"filo666" <[email protected]> wrote in message
news:[email protected]...
> 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" <[email protected]> wrote in message
>> news:[email protected]...
>> >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
>>
>>
>>
LOL, you left the impossible for the rest of us! When you start a new
workbook you get... a NEW workbook. Empty. Unless I'm mistaken I didn't
think you could start a new workbook and have it automatically pick up forms,
modules, etc. from another workbook. Maybe I'm misunderstanding what the OP
meant.
"JulieD" wrote:
> i didn't forget it ... i was leaving it for someone else, but you're welcome
> anyway
>
> --
> Cheers
> JulieD
> check out www.hcts.net.au/tipsandtricks.htm
> ....well i'm working on it anyway
> "filo666" <[email protected]> wrote in message
> news:[email protected]...
> > 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" <[email protected]> wrote in message
> >> news:[email protected]...
> >> >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
> >>
> >>
> >>
>
>
>
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" <[email protected]> wrote in message
news:[email protected]...
> 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" <[email protected]> wrote in message
> > news:[email protected]...
> > >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
> >
> >
> >
See, I didn't know that. Thanks for the info.
"Tom Ogilvy" wrote:
> 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" <[email protected]> wrote in message
> news:[email protected]...
> > 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" <[email protected]> wrote in message
> > > news:[email protected]...
> > > >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
> > >
> > >
> > >
>
>
>
got to make these MVPs work
--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Charlie" <[email protected]> wrote in message
news:[email protected]...
> LOL, you left the impossible for the rest of us! When you start a new
> workbook you get... a NEW workbook. Empty. Unless I'm mistaken I didn't
> think you could start a new workbook and have it automatically pick up
> forms,
> modules, etc. from another workbook. Maybe I'm misunderstanding what the
> OP
> meant.
>
> "JulieD" wrote:
>
>> i didn't forget it ... i was leaving it for someone else, but you're
>> welcome
>> anyway
>>
>> --
>> Cheers
>> JulieD
>> check out www.hcts.net.au/tipsandtricks.htm
>> ....well i'm working on it anyway
>> "filo666" <[email protected]> wrote in message
>> news:[email protected]...
>> > 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" <[email protected]> wrote in message
>> >> news:[email protected]...
>> >> >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
>> >>
>> >>
>> >>
>>
>>
>>
Let me see if I understand; could run a form in a new object just if
previusly I have a workbook with the "Private Sub App_NewWorkbook" event??
this is it???
there in no way of run my form when a user double click the excel's icon???
"Charlie" wrote:
> See, I didn't know that. Thanks for the info.
>
> "Tom Ogilvy" wrote:
>
> > 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" <[email protected]> wrote in message
> > news:[email protected]...
> > > 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" <[email protected]> wrote in message
> > > > news:[email protected]...
> > > > >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
> > > >
> > > >
> > > >
> >
> >
> >
After reviewing the info at that site it appears that the answer is still
"no, you cannot simply double-click the Excel icon and have a form start up."
Users would have to double-click a workbook that you have previously set up
for them. You could have it ask them to save it under another name on exit.
"filo666" wrote:
> Let me see if I understand; could run a form in a new object just if
> previusly I have a workbook with the "Private Sub App_NewWorkbook" event??
>
> this is it???
> there in no way of run my form when a user double click the excel's icon???
>
> "Charlie" wrote:
>
> > See, I didn't know that. Thanks for the info.
> >
> > "Tom Ogilvy" wrote:
> >
> > > 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" <[email protected]> wrote in message
> > > news:[email protected]...
> > > > 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" <[email protected]> wrote in message
> > > > > news:[email protected]...
> > > > > >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
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
It probably is -depending on which Excel icon of course. But this grows into
a "what's theoretically possible" thing and those can get pretty extensive.
Please tell us what this is for and why for a more practical approach.
HTH. Best wishes Harald
"filo666" <[email protected]> skrev i melding
news:[email protected]...
> Let me see if I understand; could run a form in a new object just if
> previusly I have a workbook with the "Private Sub App_NewWorkbook" event??
>
> this is it???
> there in no way of run my form when a user double click the excel's
icon???
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks