+ Reply to Thread
Results 1 to 14 of 14

Problem in defining range

  1. #1
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Post Problem in defining range

    Hi,

    I have a problem in VBA macro. I need to define a range from a different sheet, for example "Sheet A". I am getting the error in the following code. I have three tabs.

    Please Login or Register  to view this content.
    Full code is
    Please Login or Register  to view this content.
    Can someone help me in this.

    Thanks a lot in advance.

    aganesan99
    Last edited by aganesan99; 01-08-2014 at 09:51 AM.

  2. #2
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Problem in defining range

    Untested:

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Problem in defining range

    Hi Excelnoub,

    Thanks for your reply.

    I tried both your suggestions but it is not showing the error. Nothing is happening.

    I couldn't figure out the problem

  4. #4
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Problem in defining range

    Just to check... What is your Tab's name?

  5. #5
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Problem in defining range

    Data Sheet

  6. #6
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Problem in defining range

    Untested

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Problem in defining range

    Enabled VBA references.JPG

    These are the enables VBA references. Is there anything I have left.

    I have tried your above statement also. But nothing is happening.

  8. #8
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Problem in defining range

    I am using these codes in 2003 version of excel. Is that the problem?

  9. #9
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Problem in defining range

    post a sample sheet and the members can debug your code.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  10. #10
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Problem in defining range

    Hard to see without a demo sheet... if you could upload one or try to see if you cannot implement the Ron De Bruin Outlook mail code... Working in Office 2000-2010

    http://www.rondebruin.nl/

  11. #11
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Problem in defining range

    Hi Excelnoub,

    Sorry for late reply.

    Please find atttached the sample file I am using.

    Please help.

    Thanks,
    aganesan99
    Attached Files Attached Files

  12. #12
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Problem in defining range

    Tried it on excel 2007 and no issues on this line

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Problem in defining range

    You are working with 2010 right?

    I have changed my reference to 12.0 Object library and I get the following message when runing the macro:

    "Please enter the begining row" Then VB msg: "D:\\template\\ Not found"

    Works on 2007

  14. #14
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Problem in defining range

    Hi Excelnoub / xlbiznes,

    Thanks for your help. I figured out what the problem is and solved it. Its because from column A to column AR, the range was defined as a Table and so it didn't pick it think. I converted into normal range and then it worked.

    Thanks for your effort and time.

    aganesan99

+ 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] Problem defining a variable range to auto sum
    By Excelisdrivingmemad in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 02-03-2013, 11:55 AM
  2. [SOLVED] defining a range subset based on a primary range for use in Median and Mode functions
    By Araise in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2013, 06:39 PM
  3. [SOLVED] problem defining quote sign " in formula property applied to range object
    By mnjofra in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2012, 05:18 PM
  4. Replies: 5
    Last Post: 12-25-2011, 08:19 AM
  5. Syntax problem defining range for pivot table
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2006, 02:55 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