Solved

Variable declaration in VBA

Posted on 2014-12-10
2
168 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 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