+ Reply to Thread
Results 1 to 3 of 3

read data from cells and convert to sheet object

  1. #1
    Registered User
    Join Date
    09-16-2010
    Location
    spain
    MS-Off Ver
    Excel 365
    Posts
    14

    read data from cells and convert to sheet object

    Hello,

    I want to hide all worksheets which are listed in a table.
    The list contains the sheet codenames (Sheet1, Sheet2, etc.).
    The problem is to read the data in the list and convert the string to a sheet object.

    The following code doesnt´t work:

    For i = 63 To 96
    numero = Worksheets("tablas macro").Cells(i, 1)
    numero.Visible = False
    Next i

    The cells contain the codenames Sheet1, etc.
    Any suggestion?

    Thanks a lot

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: read data from cells and convert to sheet object

    If you've listed the code names rather than the names of the sheets then try this:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    09-16-2010
    Location
    spain
    MS-Off Ver
    Excel 365
    Posts
    14

    Re: read data from cells and convert to sheet object

    In the meantime I found the solution, it's working now
    Thanks in any case WDB !


    For i = 63 To 96
    numero = Worksheets("tablas macro").Cells(i, 1)
    For Each ws In ThisWorkbook.Worksheets
    If ws.CodeName = numero Then
    ws.Visible = False
    End If
    Next ws
    Next i

+ 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] Format cells to convert whole number to read in inches
    By joebell in forum Excel General
    Replies: 5
    Last Post: 09-20-2014, 07:37 PM
  2. Formula to read data from different sheet, eliminating empty cells
    By jrosko1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2014, 11:52 AM
  3. [SOLVED] application-defined/object-defined error 1004 when trying to read from or write to cells
    By florin_excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2012, 08:38 AM
  4. How to Read XML Data Stored in Script Object/Tag Embedded on Worksheet
    By ptownbro985 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2012, 01:59 PM
  5. Replies: 9
    Last Post: 04-04-2011, 12:03 AM
  6. convert saved chart in sheet to object
    By Khoshravan in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-26-2006, 05:00 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