+ Reply to Thread
Results 1 to 4 of 4

can't understand code

  1. #1
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    can't understand code

    what does
    HTML Code: 
    mean in VBA

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: can't understand code

    Dws is a variable that represents a worksheet
    Dlr is a number, representing a row

    Target is an argument that Excel generates, it means "the cell in question", usually either the cell that was just selected or the cell that was just changed. (Actually Target can be a multi-cell range, but that line assumes that it is a single cell. I'm guessing that that line is inside a branching loop to insure that Target is only one cell.)


    That line of code changes the value of row Dlr, column B on sheet Dws to equal the value of the cell to the left of the Target cell.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: can't understand code

    this is my code
    HTML Code: 
    what is suppose to go in B is a furnace number which worked fine when the start time went to column A now it goes to columb C and the furnace number isn't going where is suppose to.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: can't understand code

    Offset(row count, column count). If row count is negative move up from the target, else down. If column count is negative, move left, else move right. Since you code is specifying Target as the starting point and you did not post the entire code we don't know which cell is the reference point for the move.
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Understand what the following code does
    By Stanley91 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-08-2014, 06:14 AM
  2. Trying to Understand VBA Code....
    By konquistador in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2009, 04:35 PM
  3. Understand code
    By smlaff01 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-15-2007, 04:04 PM
  4. Don't Understand Code
    By miracleblake in forum Excel General
    Replies: 3
    Last Post: 12-08-2005, 04:15 PM
  5. Help me understand this code
    By Carrot in forum Excel General
    Replies: 2
    Last Post: 10-14-2005, 01:07 AM

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