+ Reply to Thread
Results 1 to 5 of 5

InputBox option and its features(looping,row switching,data collecting)

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Bosnia and Herzegovina
    MS-Off Ver
    Excel 2010
    Posts
    35

    InputBox option and its features(looping,row switching,data collecting)

    Got a few questions related to the InputBox via VBA in excel.
    I've used some basic VBA before,first time trying to use a inputBox.

    Anyways:

    1.Can an InputBox be 'confined' within 1 sheet only?
    example:
    i create 2 sheets,1 called "data",other called "formulas".Can it be set up in a way that the InputBox would only pop out if i click onto the sheet "data".While if i'm in sheet "formulas" the InputBox wouldn't popout?Same goes for the action of opening excel,popout shouldn't pop once i open excel,but only if i switch/click into the tab "data".

    2.How to make InputBox log its data into specific cells,with automatic row transitions?InputBox has to loop too.
    example:
    i would link InputBox to log its entries into Column A.
    Now,it pops out,i enter data,it enters that data onto A1.
    Then,automatically,InputBox loops,it pops out again,and once i enter a data for 2nd time,it enters that data onto A2.
    So,it goes to next row after each loop(i guess i could set up the next row featur myself with LR+1 and End(xlUp).Row.But i stillwonder about the loop function).
    Then,there would have to be a way to manually stop the loop when wanted,so it wouldn't 'block' the excel file.

    3.Is it possible to enter 2 different data for 2 cells via same InputBox?

    Like intering "4evra,10" in InputBox,and the excel automatically entering it as "4evra" in A1,and "10" in B1

    Thanks in advance

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: InputBox option and its features(looping,row switching,data collecting)

    Quote Originally Posted by 4evra View Post
    1.Can an InputBox be 'confined' within 1 sheet only?
    Can be done:
    This depends how you want the InputBox to be opened, automatically when a specific worksheet is activated? or clicking a button?
    For automatic opening use the "Worksheet_Activate" event in the worksheet module of the "data" worksheet.

    Quote Originally Posted by 4evra View Post
    2.How to make InputBox log its data into specific cells,with automatic row transitions?InputBox has to loop too.
    You need a loop for sure, and the InputBox inside the loop, each time the user enters sth, increment the row.
    To stop the loop you can either use a specific text to enter into the box e.g. "Stop" or enter nothing

    Quote Originally Posted by 4evra View Post
    3.Is it possible to enter 2 different data for 2 cells via same InputBox?
    Yes, if you define "," as the separator then
    Split("4evra,10",",")(0) returns the first part and
    Split("4evra,10",",")(1) the 2nd

    If you need and example let me know
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    Bosnia and Herzegovina
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: InputBox option and its features(looping,row switching,data collecting)

    i've got it this far

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So,i've got a button, and a Do.Loop Until does the job with looping the popout window.
    Rows do increment too.

    I don't get the last part,the separator thingy.
    Never done it before.
    Do i need to declare the "," as a separator,or i just do a Split feature?
    I could use help with that last part

  4. #4
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: InputBox option and its features(looping,row switching,data collecting)

    try
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    Bosnia and Herzegovina
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: InputBox option and its features(looping,row switching,data collecting)

    Works like a charm

    Many thanks !

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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