Results 1 to 3 of 3

macro beginner error

Threaded View

  1. #1
    Registered User
    Join Date
    11-26-2007
    Posts
    17

    macro beginner error

    Hi, I'm a complete macro noob. but i think I've got this worked out, at least in principle. I'm trying to use a value in Sheet1.Range("A1") to move to a certain row in Sheet2 and add a value. this is my code so far:

    Sub test()
    '
    ' test Macro
    ' Macro recorded 11/27/2007 by none
    '
    
    '
    Dim y As Integer
    y = ActiveSheet.Range("A1").Value
    Sheets("Sheet2").Select
    ActiveSheet.Range.Cells(y, 1) = "some value"
    End Sub
    I get an error on the last line : ActiveSheet.Range.Cells(y, 1) = "some value"

    does anyone have any insight on to what is going wrong.

    Thank you
    Last edited by NBVC; 11-27-2007 at 09:47 AM.

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