cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Date in VB6 "MonthView" Control

ChrisNewsom
Level 3
Hi

We are currently trying to automate a business process. Part of the process involves setting a date using a calendar control which is classified as a 'MonthView' control within VB6. This control is part of the 'Microsoft Windows Common controls-2 6.0 (sp6)' library.

We can spy the element in Blue Prism using Win32 mode, however we are experiencing issues with setting the date for the control.

We have the element type set to Month Calendar Picker.

This is allowing us to select the 'Set Value' option in a Navigate stage, which then asks for a 'DateTime' input. However, regardless of the data type used for the input (we have tried Text, Date and DateTime), we are receiving the same error as below;

Internal : Failed to perform step 1 in Navigate Stage 'Set Calendar Value' on page 'Death Reg' - Unable to parse string '' as a valid date time

We have also tried using a Write stage but this gives the following error;
Internal : Failed to perform step 1 in Write Stage 'Write to Calendar' on page 'Death Reg' - Set DateTime Value is not implemented for controls with class name 'MonthView20WndClass'

We have tried the following combinations;

01/08/2020 or 01/08/2020 00:00:00 as Text
01/08/2020 00:00:00 as a DateTime
01/08/2020 as a Date

Does ​anyone have any experience with anything similar and any advice?

Thanks in advance,

------------------------------
Christopher Newsom
RPA Developer
United Kingdown
------------------------------
1 BEST ANSWER

Helpful Answers

james.man
Staff
Staff
Hello,

If you've tried the immediately obvious options, such as Write, it may be worth investigating the use of Send Key Events to try and interact with your calendar element.  Send Key essentially mimic pressing keys on the keyboard.  

If you're able to interact with your calendar using key presses such as tab, left right arrow, enter key etc., you can use those same key presses to interact with it in Blue Prism as well.

A guide on how to use Send Keys can be found here: https://portal.blueprism.com/documents/guide-send-keys-and-send-key-events

------------------------------
James Man
Professional Services
Blue Prism
Asia/Hong_Kong
------------------------------

View answer in original post

1 REPLY 1

james.man
Staff
Staff
Hello,

If you've tried the immediately obvious options, such as Write, it may be worth investigating the use of Send Key Events to try and interact with your calendar element.  Send Key essentially mimic pressing keys on the keyboard.  

If you're able to interact with your calendar using key presses such as tab, left right arrow, enter key etc., you can use those same key presses to interact with it in Blue Prism as well.

A guide on how to use Send Keys can be found here: https://portal.blueprism.com/documents/guide-send-keys-and-send-key-events

------------------------------
James Man
Professional Services
Blue Prism
Asia/Hong_Kong
------------------------------