+ Reply to Thread
Results 1 to 5 of 5

Code won't work on every "tab"

  1. #1
    Forum Contributor
    Join Date
    01-03-2016
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    2016
    Posts
    125

    Code won't work on every "tab"

    I finally finished the "beta test" of my workbook. But it isn't working on every "tab" (in my case, each month).
    When I debug it, it says that it has something to do with the tables name, but I don't know what to do to solve it (my code uses the table's name to work).

    I'm attaching it here because copy/past the code would take so many lines in here (even with CODE tag)
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code won't work on every "tab"

    Where in the workbook is the code you are having problems with?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    01-03-2016
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    2016
    Posts
    125

    Re: Code won't work on every "tab"

    Quote Originally Posted by Norie View Post
    Where in the workbook is the code you are having problems with?
    When I click "Income" to enter with income and income options, and when I click "Enter data" to enter with data and data options.
    Their codes are:
    Income = Income
    Enter data = Userform

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Code won't work on every "tab"

    Try to use an index instead of the table name
    ie ActiveSheet.ListObjects(2) instead of ActiveSheet.ListObjects("Table1")

  5. #5
    Forum Contributor
    Join Date
    01-03-2016
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    2016
    Posts
    125

    Re: Code won't work on every "tab"

    Quote Originally Posted by nilem View Post
    Try to use an index instead of the table name
    ie ActiveSheet.ListObjects(2) instead of ActiveSheet.ListObjects("Table1")
    It worked perfectly!! Thank you =)

+ 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. Replies: 3
    Last Post: 01-02-2014, 02:15 PM
  2. [SOLVED] Range("A1") = Sheets("Sheet2").CenterHeader.Text doesnt work.
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2013, 07:06 AM
  3. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. [SOLVED] Copy multiple rows that contain a certain "name" in column "A" then paste it into new work
    By rschlot2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2013, 02:25 PM
  6. Open files from FTP server (works with "servername" but doesn't work with "ip address")
    By adammsu1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2012, 04:30 PM
  7. [SOLVED] pictures to work with "data" "sort" option
    By arad in forum Excel General
    Replies: 1
    Last Post: 04-18-2006, 04:15 PM

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