vba - Run-time error '-2032465766 (86db089a)' "Requested operation is presently disabled." -


this weird. why visio throw exception?

scenario:

  1. open new instance of visio.
  2. press ctrl+n blank new document.
  3. goto vb editor.
  4. open default "thisdocument" code file.
  5. paste following code.

     sub test()     application.activewindow.selectall end sub 
  6. execute subroutine "test".

you observe exception code line "application.activewindow.selectall":

--------------------------- microsoft visual basic applications --------------------------- run-time error '-2032465766 (86db089a)':    requested operation presently disabled. --------------------------- ok      --------------------------- 

does know why?

the error "requested operation presently disabled" means literally - requested operation disabled (in menu) @ moment (because makes no sense).

in case, can't "select all" because there nothing select (you have no shapes). command "select all" disabled.

if had shapes on drawing, code run fine.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -