Multi-Page Form issue with DTPicker

cleverku

New Member
Joined
Oct 7, 2004
Messages
33
Hi,

I have a problem with a multi-page Form (the one with multiple tabs).

On one page of the multi-page form I have a DTPicker (Windows Date and Time Picker).

When I am on a different page, I run code which may change the date value that is selected on the DTPicker.

The problem I am having is that if I am not on the page where the DTPicker is when my code is trying to update it, I get a run time error

Run Time Error '35788': An error occurred in a call to the Windows Date and Time Picker control

A messy way around this I have used is to have my code select the page where the DTPicker is located before changing it's value, and then going back to the original page, but then I get a really messy looking page flicking which I can't have.

What is a good solution around this. I'd be happy with either a way to avoid the error, or just stick with flicking accross page, but then have some kind of ScreenUpdating = False that would apply to the pages so that the user doesn't see the flicking.

Any help really appreciated.

Chris
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
The first thing I would do is declare a module level variable in your userform to hold a reference to the instance of your dp. I would also try the Controls collection of the multipage page that parents it.
 
Upvote 0

Forum statistics

Threads
1,221,692
Messages
6,161,327
Members
451,697
Latest member
pedroDH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top