Solved

Variable declaration in VBA

Posted on 2014-12-10
2
176 Views
Last Modified: 2014-12-10
Is there any meaning for declare the variable appended with % and P in Excel VBA ?

Dim I%, P$          

And what's the following implication :
  P = Range(Cells(I + 1, sLink).Address(RowAbsolute:=False, columnAbsolute:=False))

Tks
0
Comment
Question by:AXISHK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 250 total points
ID: 40493037
The % and $ symbols are shorthand for declaring I as of type Integer and P as of type String:
http://msdn.microsoft.com/en-us/library/s9cz43ek.aspx

I have no idea on the second part of your question.
0
 
LVL 14

Accepted Solution

by:
ThomasMcA2 earned 250 total points
ID: 40493060
For the 2nd part of your question, P will contain the range address of Cells(I + 1, sLink). For example, it could contain $A$1 or $B$2:$C$3.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question