+ Reply to Thread
Results 1 to 2 of 2

Range problem (again)

Hybrid View

zara_toustra Range problem (again) 10-09-2013, 12:03 AM
:) Sixthsense :) Re: Range problem (again) 10-09-2013, 12:17 AM
  1. #1
    Registered User
    Join Date
    10-08-2013
    Location
    Québec
    MS-Off Ver
    Excel 2002
    Posts
    14

    Range problem (again)

    Hi,

    I have a simple a operation to do:
    I have a multiple buttons on sheet "DATA" and as soon as one button is clicked, I want to copy the range C:AG from the clicked line to another sheet called "TEST2".

    I always get a 1004 error, It' seems to be the way I deal with the range, but I don't get it

    many thanks




    
    Sub Button_selection()
    
       Dim rg As Excel.Range
       Set rg = ActiveSheet.Shapes(Application.Caller).TopLeftCell
       i = rg.Row
    
       Sheets("TEST2").Range("C1:AG1") = Sheets("DATA").Range(Cells(i, "C"), Cells(i, "AG")).Value
    
    
    
    End Sub

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Range problem (again)

    Your code is working fine for me


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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. Problem using loop for sending excel range in email body using Range to HTML code
    By drajanm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-24-2012, 03:17 AM
  2. Replies: 15
    Last Post: 04-25-2012, 05:21 PM
  3. N(range) problem
    By zotje in forum Excel General
    Replies: 8
    Last Post: 12-03-2010, 08:16 PM
  4. Range Problem
    By Sharky Amit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2009, 05:23 PM
  5. Range problem - I think
    By aikidokid in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 02-06-2007, 01:29 PM

Tags for this Thread

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