vba - Keeping out VBE Editor Window Flicker -
there have been posts this, seems i'm doing wrong, window still flickering. here's relevant part of code:
private declare function lockwindowupdate lib "user32" (byval hwndlock long) long private declare function findwindow lib "user32" alias "findwindowa" (byval classname string, byval windowname string) long 170 oexcel.vbe.mainwindow.visible = false 180 vbehwnd = findwindow("wndclass_desked_gsk", oexcel.vbe.mainwindow.caption) 190 if vbehwnd lockwindowupdate vbehwnd 200 mb.vbproject.vbcomponents(mb.worksheets(sht.name).codename).codemodule 210 .insertlines line:=.createeventproc("click", printbut.name) + 1, string:=vbcrlf & "call sheet4.printbutton" 220 end 230 oexcel.vbe.mainwindow.visible = false 240 lockwindowupdate 0&
what doing wrong? (the code based on cpearson's code).
thanks help.
i've tried , couldn't work. alternative (not preferable) ended using is:
170 oexcel.vbe.mainwindow.visible = false 180 curpos = oexcel.vbe.mainwindow.left 190 oexcel.vbe.mainwindow.left = 10000 200 mb.vbproject.vbcomponents(mb.worksheets(sht.name).codename).codemodule 210 .insertlines line:=.createeventproc("click", printbut.name) + 1, string:=vbcrlf & "call sheet4.printbutton" 220 end 230 oexcel.vbe.mainwindow.visible = false 240 oexcel.vbe.mainwindow.left = curpos
vba excel-vba vb6
No comments:
Post a Comment