phantomi_man
New Member
- Joined
- Jul 28, 2021
- Messages
- 1
- Office Version
- 2010
Hello,
I would like to know if there's a way to call a specific sub (like sub generate_list) that would constantly check if anything is happening on an excel form.
For example, currently if I enter something in a textbox, the sub
will call a
like
the generate_html sub generates a HTML file and then displays it in
like a html preview
The problem of course is that the textbox only updates when you move to the next textbox or click on the form. Which is fine. But that means the HTML preview isn't as instant as I would like (like showing the actual real time typing)
I could change the textbox event trigger as change
But the problem is that this is slow. Because if I do a keystroke it will call the
every time and complete the routine (generate HTML and display it) and only THEN it will show what is being typed in the text box. Like if someone would type something and the keyboard would hold the input for few seconds.
Basically every letter generates a preview. Which is what I want but I would like it seamlessly in the background - constantly refreshing and generating the preview.
Thank you
And i'm sorry I have not much code to show
I would like to know if there's a way to call a specific sub (like sub generate_list) that would constantly check if anything is happening on an excel form.
For example, currently if I enter something in a textbox, the sub
VBA Code:
sub textbox_afterupdate ()
VBA Code:
sub generate_html
like
VBA Code:
sub name_afterupdate ()
call generate_html
end sub
the generate_html sub generates a HTML file and then displays it in
VBA Code:
WebBrowser1.Navigate filepath
like a html preview
The problem of course is that the textbox only updates when you move to the next textbox or click on the form. Which is fine. But that means the HTML preview isn't as instant as I would like (like showing the actual real time typing)
I could change the textbox event trigger as change
VBA Code:
sub name_change()
call generate_html
end sub
But the problem is that this is slow. Because if I do a keystroke it will call the
VBA Code:
sub generate_html
Basically every letter generates a preview. Which is what I want but I would like it seamlessly in the background - constantly refreshing and generating the preview.
Thank you
And i'm sorry I have not much code to show