+ Reply to Thread
Results 1 to 3 of 3

What is Dim?

  1. #1
    Registered User
    Join Date
    07-03-2008
    Location
    Scotland
    Posts
    58

    What is Dim?

    Hi guys,

    I have been using the four lines below in macros. They were part of one of the macros royUK helped me with. I keep using them, but I have no idea what it means.

    Can somebody tell me what I am actually telling the macro? I think it would help me greatly in expanding my understanding of macros.

    Dim cl As Range
    Dim rng As Range
    Dim R As Long
    Dim X As Long

    The help is enormously appreciated. I am learning more every day.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    Not to be unhelpful but you could look all this up in VBA Help. Basically you're 'declaring' that these variables represent a range (of cells) or an integer between certain set values (can't remember the limits offhand). It's good practice to do this.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    See if this helps

    http://www.excel-it.com/clear_code.htm

    Also, if you highlight a word in the VB Editor & press F1 then the relevant help file will open
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1