Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default problem with coding

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

--
Regards,
Tom Ogilvy

"Subs" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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" wrote in message
...
Why wouldn't they be able to change these dates with commandbuttons?

--
Regards,
Tom Ogilvy

"Subs" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
...
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" wrote in message
...
Why wouldn't they be able to change these dates with commandbuttons?

--
Regards,
Tom Ogilvy

"Subs" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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" wrote in message
...
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" wrote in message
...
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" wrote in message
...
Why wouldn't they be able to change these dates with commandbuttons?

--
Regards,
Tom Ogilvy

"Subs" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
...
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" wrote in message
...
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" wrote in message
...
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" wrote in message
...
Why wouldn't they be able to change these dates with commandbuttons?

--
Regards,
Tom Ogilvy

"Subs" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with my coding problem? Dan the Man[_2_] Excel Worksheet Functions 3 September 11th 07 12:02 AM
Please help: Coding Problem Tim Excel Programming 4 June 28th 05 05:41 AM
Coding problem John[_105_] Excel Programming 3 June 22nd 05 05:39 PM
Problem coding a Sort Peter Chatterton[_2_] Excel Programming 3 September 21st 04 10:41 PM
Excel VBA : Coding Problem wuming[_16_] Excel Programming 2 July 28th 04 02:19 AM


All times are GMT +1. The time now is 01:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"