I need to write a code where I create an Excel TextBox with a text that has to be underlined with a red dashed line.
Because it seems there isn’t a built in way for it, I created a function using SendKeys
instructions to bypass the problem and do a red dashed underline for the text
When I try with the function in the same Excel file, it works.
But because of some specificities of the project, I have to put the function in another Excel. And when I try this case, the SendKeys
don’t work when they are supposed to. They activate at the end of the script
Here is the function:
Application.SendKeys "%lP{TAB 5}~{DOWN 6}~{TAB}~{DOWN 7}{RIGHT}~{TAB}~"
The paint is to explain better the situation
user27433975 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4