+ Reply to Thread
Results 1 to 3 of 3

Dynamic TextBoxN_KeyDown

  1. #1
    Registered User
    Join Date
    06-21-2018
    Location
    Bulgaria
    MS-Off Ver
    2013
    Posts
    9

    Dynamic TextBoxN_KeyDown

    Hello fellow Excelers,

    I have this weird issue that is pretty cosmetic but it's bugging me like hell and I want to fix it but I simply cannot think it through...

    I have 3 TextBox ActiveX components and I have the following Subs:

    Please Login or Register  to view this content.
    The thing is that these 3 boxes are not always 3. Depending on other sheet values sometimes I have 2 and sometimes 1. Executed by both .Enabled = False and .Visible = False. Also as they are on 3 different rows I have .EntireRow.Hidden = True.

    The problem is when I have 1 or 2 the KeyDown subs are unhiding the rows. I tried with multiple IFs and reinforcing the 'hiding' again but whatever I try the hidden rows always end up unhidden.

    Any suggestion how I can optimize this?

    Thank you!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Dynamic TextBoxN_KeyDown

    Where is your code that hides\unhides rows?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    06-21-2018
    Location
    Bulgaria
    MS-Off Ver
    2013
    Posts
    9

    Re: Dynamic TextBoxN_KeyDown

    Public Sub in Module 1 'Call'ed in different ocasions. It's pretty long sub with a lot of IFs to paste it all but 1 of the fragments is:
    Please Login or Register  to view this content.
    If I try something like "if TextBox4.Enabled = False then".... 'skip tb4 and go to tb5' then I believe the checking of the 'if' argument is unhiding the row although the activating itself goes directly to tb5. It sounds weird but I believe it also makes sense.

+ 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] Populate Dynamic Array from Cell Values and write to Dynamic Range
    By TFiske in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2018, 09:09 AM
  2. Dynamic Table of Store/Bank with location assignment (Dynamic Inventory)
    By x_ampl1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-14-2017, 01:58 PM
  3. Replies: 10
    Last Post: 10-09-2014, 06:20 PM
  4. Dynamic Range Column Chart w/ Dynamic Avg Line (Excel 2007)
    By BrokenBiker in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-04-2012, 11:40 AM
  5. Replies: 0
    Last Post: 02-28-2006, 09:10 PM
  6. Replies: 0
    Last Post: 02-28-2006, 09:10 PM
  7. Replies: 2
    Last Post: 02-02-2006, 04:10 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