Select to view content in your preferred language

Changing the mouse cursor back to the Select elements tool after VBA code is executed

1027
3
05-13-2010 06:12 AM
DavidKelly1
Emerging Contributor
This is probably easy but I am not sure how to do it.  I have a custom tool I developed in VBA; once the tool is used I want to change the mouse cursor back to the Select elements tool.

Thanks for your help

David Kelly
0 Kudos
3 Replies
DavidKelly1
Emerging Contributor
I have been trying to change the mouse cursor.  Why does the code below not work.  It bombs when it set the value of UID.

  Dim pCmdBars As ICommandBars
  Set pCmdBars = ThisDocument.CommandBars
  Dim pCmdItem As ICommandItem
 
  Dim pUID As New UID
  
  pUID.Value = "{C22579D1-BC17-11DO-8667-0000F8751720}"
  'pUid.Value = "{esriArcMapUI.SelectTool}"
 
  Set pCmdItem = pCmdBars.Find(pUID)
 
  'sets the cursor to the Select Elements tool
 
  pCmdItem.Execute

Thanks,

David
0 Kudos
NirYoscovitz
Emerging Contributor
Hi David,

There is a nasty typo in the UID value supplied.
It should be "{C22579D1-BC17-11D0-8667-0000F8751720}", not "{C22579D1-BC17-11DO-8667-0000F8751720}"

Regards,
Nir
0 Kudos
DavidKelly1
Emerging Contributor
Thank you.
0 Kudos