+ Reply to Thread
Results 1 to 11 of 11

TextBox Value equals worksheet...

  1. #1
    Registered User
    Join Date
    07-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    16

    Question TextBox Value equals worksheet...

    OK, I've been scouring the forums to try and find the solution myself before asking for help. I can't seem to find the solution to what is seemingly an easy task, compared to what I've seen some of you doing on here.
    I have a userform with a textbox and commandbutton. I want to be able to look for the worksheet name based on what is entered into the textbox and if it matches then open the worksheet.
    I'm sorry! I feel like a shmuck! I can't seem to find it in this big 10 lbs. book I have sitting next to me either. I could just be thinking about this in the wrong way.
    The only request I have is if you post a response please explain why it works so I can learn from this. I really want to be able to "get this".
    Thanks in advance.
    WHAT????

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: TextBox Value equals worksheet...

    Try:
    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    07-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: TextBox Value equals worksheet...

    Thanks but not really what I was looking for. I have a texbox1 set up. I'm trying to tell the userform to look for and open the worksheet based on what what is scanned in for a name.
    Don't get me wrong, your input box popped up and I was like, "Dang that's slick!"
    So normally you would place the code you posted in a module? Then call it from another userform?
    I have an initial userform that pops up giving the user options of tasks to perform. What I am asking for above will open the specific sheet so the user can add data to it from another userform.
    I'm probably over complicating the process.

  4. #4
    Forum Contributor
    Join Date
    03-14-2012
    Location
    location
    MS-Off Ver
    Excel 2007
    Posts
    170

    Re: TextBox Value equals worksheet...

    or use a combobox...
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    blue

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: TextBox Value equals worksheet...

    No that I think that will be simple enough. I didn't know you had a userform. Can you upload a sample workbook (preferably with the userform already it it ) for me to work on?

  6. #6
    Registered User
    Join Date
    07-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: TextBox Value equals worksheet...

    You know what? I like your way. Can you please explain your code a bit. I'm looking at it and I think I understand what it's doing. I need to break it down.

  7. #7
    Registered User
    Join Date
    07-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: TextBox Value equals worksheet...

    By the way...Thanks.

  8. #8
    Registered User
    Join Date
    07-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: TextBox Value equals worksheet...

    or use a combobox...
    I had thought about that but then I would need to make sure any new sheets gets added to the range.
    It's a bit more than I'm able to do right now.
    I'm going to get this project "finished" first then go back and tweak it so it runs smoothly. It's a bit of a mess right now.
    Xero Solus - I really like the look of those input boxes. Is there a resouce I can look at to see if I can substitute them for some of my userforms I'm using to write to the sheets?

  9. #9
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: TextBox Value equals worksheet...

    Please Login or Register  to view this content.
    If you copy and paste this into a button click event on your user form then they can click a button and the inputbox will pop up like normal. It is a way to integrate it into your userform.

  10. #10
    Registered User
    Join Date
    07-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: TextBox Value equals worksheet...

    Please Login or Register  to view this content.
    I changed the wording on the MsgBox to fit what I need. The problem is that if the sheet doesn't exist it still goes onto the next userform to input data onto a sheet. It should just say that it isn't a valid entry.
    I looked up the input boxes in my big *** book but it only had a few pages. I'm going to look through the forums some more.

  11. #11
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: TextBox Value equals worksheet...

    Sorry I missed a line...

    Please Login or Register  to view this content.

+ 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. VBA - Macro Code to copy textbox text to another worksheet textbox
    By nitram lowm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-05-2013, 08:39 AM
  2. Macro to copy textbox data to a duplicate textbox in another worksheet
    By nitram lowm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-02-2013, 06:10 AM
  3. Userform to search textbox value to place other textbox values in worksheet
    By mattyh555 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2012, 11:38 AM
  4. variable equals cell value in other worksheet
    By BHudPE in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-06-2010, 09:38 PM
  5. Cell equals value if worksheet is locked
    By ryangler in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-07-2009, 02:55 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