Consulting

Results 1 to 13 of 13

Thread: This Any Use To Anyone??

  1. #1
    Administrator
    Chat VP
    VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location

    This Any Use To Anyone??

    The attachment is a workbook that uses a userform to input data into an array on the spreadsheet. This allows a "carriage-return" type of entry when there are a large number of rows.

    The array can be positioned anywhere on the s/s by using the "settings" form and can also be set for entering data row-wise or column-wise and there is also an editing mode for where mistakes are made.

    The actuating macro is "ShowForm" but there is also an "array" button assigned to the toolbar in the workbook to actuate it. Bas and frm files are enclosed for those wanting to import it into an existing workbook.

    I will be interested to know if the symbols (i.e. presswriter symbols - up, down, left, right arrows) on the edit buttons display correctly on later versions of office (I'm using '97).

    The only real drawback is (if you don't want to use the mouse) that you need to hit the enter key twice to enter data. Is there a simple way to change this?

    This started as a simple question about using textboxes to input data for an array but I decided to enlarge on it (just for the hell of it)


    (THESE PROBLEMS HAVE ALL BEEN RESOLVED NOW, PLEASE GO TO THE LAST POSTING FOR A BETTER VERSION)

  2. #2
    VBAX Tutor
    Joined
    May 2004
    Location
    Germany, Dresden
    Posts
    217
    Location
    The symbols are even in my Excel97 somewhat strange...

  3. #3
    VBAX Tutor
    Joined
    May 2004
    Location
    Germany, Dresden
    Posts
    217
    Location
    About the double-enter, what do you think of that one:


    Private Sub DataTextBox_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
       If KeyCode = vbKeyReturn Then
          EnterButton_Click
          KeyCode = 0
       End If
    End Sub

    Daniel
    Last edited by Aussiebear; 04-24-2023 at 12:40 AM. Reason: Adjusted the code tags

  4. #4
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    OK, thanks Steiner...TrueType font attached as zip file.

    I don't know where this font comes from but I seem to recall having a similar problem with it for another project.

    Will have a look at your code...TA

  5. #5
    VBAX Tutor
    Joined
    May 2004
    Location
    Germany, Dresden
    Posts
    217
    Location
    What about using Wingdings instead? I'd think that this font should be on most computers that run Office, so you won't need to install just another font...

    BTW, the entry form as a whole looks like a cool idea. I think it might come in handy...

  6. #6
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    YEP - That works perfectly steiner - many thanx. Updated workbook attached here

  7. #7
    I thought it worked pretty good. But, I have one question about the xls file.

    How did you break out and save the associated vba files separate from the xls worksheet? I have never seen this...

    ttfn
    Kicker

  8. #8
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    Quote Originally Posted by Kicker

    How did you break out and save the associated vba files separate from the xls worksheet? I have never seen this...

    ttfn
    Kicker
    Go into VBA edit and select project explorer, in project explorer, right-click onto the relevant form or module and you should see "import file..." and "export file..." as part of the menu. You can then click to import a form or module to use in your workbook or, export a form or module to use in another workbook.

    e.g. In the current example, you may already have a workbook with a lot of large arrays...so you simply import all the forms and the module into that workbook and you then have the alternative of using this for any further data input

  9. #9
    VBAX Tutor
    Joined
    May 2004
    Location
    Germany, Dresden
    Posts
    217
    Location
    @Kicker: But don't confuse this: the exported files are not USED by the workbook. The workbook still uses the form that is inside it, the separate files are just for importing into other workbooks.

  10. #10
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    Hi all,

    The symbols presented a problem as I wanted the up/down left/right buttons to be as small as possible with the symbols as large as possible, this has been (I hope, I hope) resolved now by converting the symbols to bitmaps and using these instead of symbols.

    The double-entry problem has been resolved by Steiner (thanx Daniel) and a new error handling procedure should make this latest version (attached - and renamed) almost fool-proof now

    (EDITED ON 140804 TO UPLOAD VERSION THAT CATERS FOR ALL POSSIBLE USER ERRORS THAT I CAN THINK OF - I CANT GET IT TO CRASH NOW, IF YOU CAN PLEASE LET ME KNOW)

  11. #11
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    I installed Office2000 recently and had an occasion to use this & I found the data entry text box would not keep the focus (the previous was done on Office97).

    The code needs a slight mod to operate properly in 2000, a 2000 version is attached HERE >>

  12. #12
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    Hi All,

    Personally I use the Marlett font.

    3 = Left arrow
    4 = Right arrow
    5 = Up arrow
    6 = Down arrow
    Cheers
    Andy

  13. #13
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    Quote Originally Posted by Andy Pope
    Hi All,

    Personally I use the Marlett font.

    3 = Left arrow
    4 = Right arrow
    5 = Up arrow
    6 = Down arrow
    Andy, that is EXCELLENT!!...That was the "missing link" I needed. I didn't even realize those symbols were in there.

    Was able to re-arrange the controls and make it look a whole lot tidier using the Marlett font...Thanks SO much.

    Will re-post the modified versions ('97 and 2000) elsewhere as potential items for the KB shortly if anyone else wants to download...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •