infor.com
concierge
infor u
developer portal
Home
Groups
VISUAL - Enterprise Customer Community
Refresh window from Macro
unknown
I've created a Macro that will update unit_price based on the material cost using a markup based on the commodity code inside the Estimating Window.
Everything works great. Just wondering if there is any syntax to refresh the window from the macro.
Thanks.
Find more posts tagged with
VISUAL - Enterprise General Discussions
Comments
unknown
In theory you should be able to use the SendKeys function to refresh the screen. You would want to save the estimate first and then refresh. I haven’t used this function much when it comes to macros but have heard mixed results especially when it comes to the version of Visual you’re running. I believe people had major problems with version 7 and the gupta new run time.
Hope this helps and good luck.
unknown
Thanks for the tip. Like you said in theory it should work but i'm having trouble. It may be something with the fact that I'm not talking directly with the estimating window. I tried a couple of different ways to get the name of the window but no success. I don't want to create an object. I already have an object 'Estimating Window'.
send.keys "F" 'This didn't work.
wn = getObject() 'This didn't work - Invalid Property Assignment
wn.sendkeys "F"
unknown
I'm no power scripter or programmer - I know enough to get by and cause trouble. Here's what I got to work:
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
wshShell.SendKeys("%F")
This sends the ALT F in order to open the file menu. Now depending on what version you're running is where the problem may start. Once the menu is open the next SendKeys are unresponsive. I beleive it's a Visual 7 runtime thing but not 100% sure. I thought maybe the keys were being sent fater than the system could interoperate so I tried adding a counter to slow them down however, that didn't work. The Sleep function would be ideal however I think that doesn't work in the VBscript for Visual Macros.
Hope this helps you.
unknown
I just remembered I had a macro in the estimating screen that performed a bunch of backend updates that required the screen to be refreshed for the user to see the changes. I took the easy way out and ended the code with the following:
msgbox("Complete - Refresh Screen for Updates")
So, if all else fails, have the user click a button.
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Popular Tags
Infor Lawson Human Resources Group - Discussion
Infor Lawson Technology Group - Discussion
General Discussions
VISUAL - Enterprise General Discussions
Infor Lawson Supply Chain Management - Discussion
Process Automation (IPA) - General Discussions
Pegasus - Partner General Discussions
Infor Lawson Supply Chain Group - Discussion
Infor Lawson Financials Group - Discussion
Infor EPM Discussions