title: What are the benefits and risks of using the StrPtr function in VBA?
body: <p>While looking for a way to test when a user cancels an <code>InputBox</code>, I stumbled across the <code>StrPtr</code> function.  I believe it checks if a variable was ever assigned a value and returns zero if it was never assigned and some cryptic number if it was.</p>
  
  <p>It seems like a useful function!  I started with this code:</p>
  
  <pre><code>Dim myVar as string
  myVar = InputBox("Enter something.")
  MsgBox StrPtr(myVar)
  </code></pre>
  
  <p>The message box shows a zero if the user cancelled.</p>
  
  <p>Fantastic!  But then why do some insist that <code>StrPtr</code> never be used?  I read it's unsupported.  Why does that matter?</p>
  
  <p>A good answer will explain benefits (beyond my example above) and risks of using the <code>StrPtr</code> function, possibly how you use (or don't use) it without giving an opinion as to whether everyone or no one should use it.</p>