Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 08-25-2015, 02:22 PM
lwhistler lwhistler is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Aug 2015
Posts: 2
lwhistler is on a distinguished road
Default Variable declaration

In the variable declaration, I sometimes see 3 letters written in front of the varaiable (e.g., intMy_Variable) and sometimes not. The three letters preceeding the variable seems to be defining the variable type. Other letters in front are such things is cur, sin, etc. My guess is that is defining the variable type. However, my manual says that the variable declaration must be appended with As Integer, etc to define the variable type. What are those three letters that precede the variable name used for?
Reply With Quote
  #2  
Old 08-25-2015, 03:38 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 17,649
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

The prefixes (e.g. Int, Str, Obj) are simply conventions coders might use to serve as a visual reminder of the type of variable they're working with in a given context; they have no effect on the variable declarations themselves.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 08-26-2015, 04:02 AM
lwhistler lwhistler is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Aug 2015
Posts: 2
lwhistler is on a distinguished road
Default

Thanks. I looked everywhere but could find no explanation on usage of that detail. I appreciate the response.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Variable or With block variable not set Raza Excel Programming 8 01-15-2015 12:19 AM
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge Berryblue Mail Merge 1 11-13-2014 05:36 PM
Run-time error 91 object variable or with block variable not set JUST ME Word VBA 4 03-25-2014 06:56 AM
object variable or with block variable not set MJP143 Excel 1 02-11-2013 05:07 AM
Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM


All times are GMT -7. The time now is 01:37 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft