+ Reply to Thread
Results 1 to 6 of 6

problem with coding

  1. #1
    Subs
    Guest

    problem with coding

    Hi all

    Please, can anybody let me know how to fix my problem.
    I have a userform which has two textboxes where a user fills in the
    startdate and an enddate.
    The userform also has a listbox which is populated & loaded in a procedure.
    Another procedure will process the dates, and selection from the Listbox.
    and print it out.
    However I would like to give the user the option of changing the dates by
    using a command button that would use the AddDate method.
    I am not sure where to place the code for this button as after the
    UserForm_Intialize event has fired the user will not be able to change
    these dates using the command buttons.

    Any help would be greatly appreciated.

    Kind Regards

    Subs




  2. #2
    Tom Ogilvy
    Guest

    Re: problem with coding

    Why wouldn't they be able to change these dates with commandbuttons?

    --
    Regards,
    Tom Ogilvy

    "Subs" <[email protected]> wrote in message
    news:[email protected]...
    > Hi all
    >
    > Please, can anybody let me know how to fix my problem.
    > I have a userform which has two textboxes where a user fills in the
    > startdate and an enddate.
    > The userform also has a listbox which is populated & loaded in a

    procedure.
    > Another procedure will process the dates, and selection from the Listbox.
    > and print it out.
    > However I would like to give the user the option of changing the dates by
    > using a command button that would use the AddDate method.
    > I am not sure where to place the code for this button as after the
    > UserForm_Intialize event has fired the user will not be able to change
    > these dates using the command buttons.
    >
    > Any help would be greatly appreciated.
    >
    > Kind Regards
    >
    > Subs
    >
    >
    >




  3. #3
    Subs
    Guest

    Re: problem with coding

    Hi Tom

    I think because when the program is running and the userform has loaded,
    the program doesn't respond the click event associated with these buttons.

    Regards
    Subs

    "Tom Ogilvy" <[email protected]> wrote in message
    news:%[email protected]...
    > Why wouldn't they be able to change these dates with commandbuttons?
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Subs" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi all
    >>
    >> Please, can anybody let me know how to fix my problem.
    >> I have a userform which has two textboxes where a user fills in the
    >> startdate and an enddate.
    >> The userform also has a listbox which is populated & loaded in a

    > procedure.
    >> Another procedure will process the dates, and selection from the Listbox.
    >> and print it out.
    >> However I would like to give the user the option of changing the dates by
    >> using a command button that would use the AddDate method.
    >> I am not sure where to place the code for this button as after the
    >> UserForm_Intialize event has fired the user will not be able to change
    >> these dates using the command buttons.
    >>
    >> Any help would be greatly appreciated.
    >>
    >> Kind Regards
    >>
    >> Subs
    >>
    >>
    >>

    >
    >




  4. #4
    Tom Ogilvy
    Guest

    Re: problem with coding

    If the commandbuttons are on the useform, they should.

    If they are on the worksheet, then you would need to make the userform
    non-modal (modeless)


    --
    Regards,
    Tom Ogilvy

    "Subs" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Tom
    >
    > I think because when the program is running and the userform has loaded,
    > the program doesn't respond the click event associated with these buttons.
    >
    > Regards
    > Subs
    >
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:%[email protected]...
    > > Why wouldn't they be able to change these dates with commandbuttons?
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Subs" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Hi all
    > >>
    > >> Please, can anybody let me know how to fix my problem.
    > >> I have a userform which has two textboxes where a user fills in the
    > >> startdate and an enddate.
    > >> The userform also has a listbox which is populated & loaded in a

    > > procedure.
    > >> Another procedure will process the dates, and selection from the

    Listbox.
    > >> and print it out.
    > >> However I would like to give the user the option of changing the dates

    by
    > >> using a command button that would use the AddDate method.
    > >> I am not sure where to place the code for this button as after the
    > >> UserForm_Intialize event has fired the user will not be able to change
    > >> these dates using the command buttons.
    > >>
    > >> Any help would be greatly appreciated.
    > >>
    > >> Kind Regards
    > >>
    > >> Subs
    > >>
    > >>
    > >>

    > >
    > >

    >
    >




  5. #5
    Subs
    Guest

    Re: problem with coding

    There on the userform, not on the worksheet,and their code is in the useform
    code module. Should they be in a seperate standard module?

    Regards
    Subs

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > If the commandbuttons are on the useform, they should.
    >
    > If they are on the worksheet, then you would need to make the userform
    > non-modal (modeless)
    >
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Subs" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi Tom
    >>
    >> I think because when the program is running and the userform has loaded,
    >> the program doesn't respond the click event associated with these
    >> buttons.
    >>
    >> Regards
    >> Subs
    >>
    >> "Tom Ogilvy" <[email protected]> wrote in message
    >> news:%[email protected]...
    >> > Why wouldn't they be able to change these dates with commandbuttons?
    >> >
    >> > --
    >> > Regards,
    >> > Tom Ogilvy
    >> >
    >> > "Subs" <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >> Hi all
    >> >>
    >> >> Please, can anybody let me know how to fix my problem.
    >> >> I have a userform which has two textboxes where a user fills in the
    >> >> startdate and an enddate.
    >> >> The userform also has a listbox which is populated & loaded in a
    >> > procedure.
    >> >> Another procedure will process the dates, and selection from the

    > Listbox.
    >> >> and print it out.
    >> >> However I would like to give the user the option of changing the dates

    > by
    >> >> using a command button that would use the AddDate method.
    >> >> I am not sure where to place the code for this button as after the
    >> >> UserForm_Intialize event has fired the user will not be able to
    >> >> change
    >> >> these dates using the command buttons.
    >> >>
    >> >> Any help would be greatly appreciated.
    >> >>
    >> >> Kind Regards
    >> >>
    >> >> Subs
    >> >>
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >




  6. #6
    Tom Ogilvy
    Guest

    Re: problem with coding

    No. If you used the click event of the commandbutton (selected from the
    dropdowns in the userform code module), then if you click the button, the
    code should run. That is why controls have events - so the code will run
    when the event is triggered.

    --
    Regards,
    Tom Ogilvy


    "Subs" <[email protected]> wrote in message
    news:[email protected]...
    > There on the userform, not on the worksheet,and their code is in the

    useform
    > code module. Should they be in a seperate standard module?
    >
    > Regards
    > Subs
    >
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:[email protected]...
    > > If the commandbuttons are on the useform, they should.
    > >
    > > If they are on the worksheet, then you would need to make the userform
    > > non-modal (modeless)
    > >
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Subs" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Hi Tom
    > >>
    > >> I think because when the program is running and the userform has

    loaded,
    > >> the program doesn't respond the click event associated with these
    > >> buttons.
    > >>
    > >> Regards
    > >> Subs
    > >>
    > >> "Tom Ogilvy" <[email protected]> wrote in message
    > >> news:%[email protected]...
    > >> > Why wouldn't they be able to change these dates with commandbuttons?
    > >> >
    > >> > --
    > >> > Regards,
    > >> > Tom Ogilvy
    > >> >
    > >> > "Subs" <[email protected]> wrote in message
    > >> > news:[email protected]...
    > >> >> Hi all
    > >> >>
    > >> >> Please, can anybody let me know how to fix my problem.
    > >> >> I have a userform which has two textboxes where a user fills in the
    > >> >> startdate and an enddate.
    > >> >> The userform also has a listbox which is populated & loaded in a
    > >> > procedure.
    > >> >> Another procedure will process the dates, and selection from the

    > > Listbox.
    > >> >> and print it out.
    > >> >> However I would like to give the user the option of changing the

    dates
    > > by
    > >> >> using a command button that would use the AddDate method.
    > >> >> I am not sure where to place the code for this button as after the
    > >> >> UserForm_Intialize event has fired the user will not be able to
    > >> >> change
    > >> >> these dates using the command buttons.
    > >> >>
    > >> >> Any help would be greatly appreciated.
    > >> >>
    > >> >> Kind Regards
    > >> >>
    > >> >> Subs
    > >> >>
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1