View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Ed[_18_] Ed[_18_] is offline
external usenet poster
 
Posts: 118
Default Setting OnAction of custom menu item?

Found the error in this:
I set OnAction in the Visual
Basic app as
.OnAction = "objWkbk.Sheet1!GetTIR"
where "objWkbk" is the Excel file opened by the VB app. But when I run

the
macro in the workbook, I get the error "Can't find "objWkbk.Sheet1.xls".


Of course not! objWkbk is the *object* reference, not the *filename
string*! D'oh!

So I changed it. Now I get an error '400', whatever that means. The macro
is there, and it does run when called. I just can't get this menu item to
call it.

Ed