+ Reply to Thread
Results 1 to 4 of 4

Selecting a worksheet column from a different worksheet module?

  1. #1
    Forum Contributor
    Join Date
    09-21-2014
    Location
    Midwest USA
    MS-Off Ver
    2010
    Posts
    349

    Selecting a worksheet column from a different worksheet module?

    I have a worksheet module macro triggered by clicking a hyperlink that needs to select a column on a different work sheet to find the first instance of a word in column A. What is the syntax to select a column of a different worksheet from a worksheet module? Here is an example of my code that works when the second line is commented out and fails (Run-time 1004 error) when it’s not.

    Please Login or Register  to view this content.
    I could move this to a general module to make it work, but I suspect this is a syntax issue I’d like to understand and I’m curious.
    My goal is to search for a specific word in column A and when I find the first instance, scroll the worksheet up so that line is on the top of the page. I appreciate any suggestions.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Selecting a worksheet column from a different worksheet module?

    Try ..
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Contributor
    Join Date
    09-21-2014
    Location
    Midwest USA
    MS-Off Ver
    2010
    Posts
    349

    Re: Selecting a worksheet column from a different worksheet module?

    Well, that’s embarrassing. The first thing I tried was fully-qualifying it – I must have had a typo I didn’t catch because it didn’t work for me then. Thanks for the correction.

    I’ve run across a few quirky things (quirky to me anyway) that have to be done differently between a worksheet module and a regular module. Do you know of any reference/list of such items? I tried to search for one but couldn’t find anything. It would be really handy to have something like that, imo.

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Selecting a worksheet column from a different worksheet module?

    Off hand I don't know of one, but I agree, it would be handy.
    Thank you for the rep.

+ 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] Extra Sheet not a Chart or Old Macro Module or Worksheet - Appears to be normal module???
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-06-2017, 04:10 AM
  2. Replies: 2
    Last Post: 04-13-2015, 01:25 AM
  3. Selecting an entire column and aligning it upon worksheet change.
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2013, 08:20 PM
  4. Selecting Column, Copying Data into a new worksheet Macro
    By adamkingf5371 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-22-2013, 06:26 AM
  5. [SOLVED] Selecting specific data on a worksheet and moving it to a table on another worksheet
    By wesman200098 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-08-2012, 05:45 AM
  6. Selecting Worksheet then running macro based on selected worksheet
    By CircuitAkita in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2011, 01:00 AM
  7. Run worksheet module code from workbook module?
    By keithb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2005, 12:05 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