Solved

Variable declaration in VBA

Posted on 2014-12-10
2
169 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
2 Comments
 
LVL 85

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now