Results 1 to 4 of 4

VBA code to draw values from one cell and deposit into a table below

Threaded View

anthony777 VBA code to draw values from... 09-25-2017, 11:46 AM
xladept Re: VBA code to draw values... 09-25-2017, 11:53 AM
anthony777 Re: VBA code to draw values... 09-28-2017, 10:41 AM
xladept Re: VBA code to draw values... 09-28-2017, 10:50 AM
  1. #1
    Registered User
    Join Date
    02-06-2017
    Location
    California, US
    MS-Off Ver
    Office 2016
    Posts
    38

    VBA code to draw values from one cell and deposit into a table below

    Hello,

    I am attempting to simply move data from one cell in a worksheet to another cell in the same worksheet in a loop. I believe I have declared variables correctly and this seems like a relatively simple task but I am still getting an error in the line highlighted in red.

    Option Explicit
    
    Sub autofill()
    
    
    Dim shS As Worksheet        ' Source worksheet
    Dim shD As Worksheet        ' Destination worksheet
    Dim lRow As Long
    Dim sourceCol As Integer, rowCount As Integer, currentRow As Integer, sourceRow As Integer
    Dim currentRowValue As String
    Dim destinationColX As Integer, destinationColZ As Integer, destinationColY As Integer, destinationRow As Integer
    
    
    
    
    
        sourceCol = 4
        sourceRow = 4
        destinationColX = 5
        destinationColY = 6
        destinationColZ = 7
        destinationRow = 59
        Do While sourceRow < 47
            Range("destinationColX" & "destinationRow") = Range("sourceCol" & "sourceRow")
            
        
        
        Loop
        
    
           
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VB code to seperate deposit
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-14-2017, 11:16 AM
  2. VB Code to draw rectangle
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2016, 09:53 AM
  3. Draw triangle that changes size depending on cell values.
    By alasdairfraser in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-20-2016, 11:08 PM
  4. VBA code to draw a line between two shapes
    By hawkinsr86 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2013, 02:17 PM
  5. The draw in a footy ladder table
    By Fozz in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-09-2013, 06:31 PM
  6. Replies: 3
    Last Post: 09-20-2011, 05:05 PM
  7. [SOLVED] draw shape based on cell values
    By Defoes Right Boot in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2006, 11:22 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