Command Button Prompt To Input 2 Columns Of Data

Jul 19, 2014

My new Time in Motion sheet is coming along nicely with some snazzy programmed Command Buttons to fill data into another sheet.

One of my buttons is for 'other' tasks, so I'd like to programme a button to prompt first for a number of minutes (e.g. 30), and then a brief description (e.g. Meeting) and input the data side-by-side in 2 columns on sheet 2.

This is what I have for my other single-entry buttons, so what would I need to add?

Dim ans As String
ans = InputBox("Case reference:", "Data Entry")
Sheets("Sheet2").Range("F" & Sheets("Sheet2").Range("F" & Rows.Count).End(xlUp).Row + 1).Value = ans

View 1 Replies


ADVERTISEMENT

Input Value Using Command Button

Apr 9, 2009

I have attached a spreadsheet example. I would like to be able to use a command button to pop up a series of questions for the user to input a value and have that value populate the directed cell.

Example from spread sheet:Click - "How many bid" button
First question should be " How many for Joe"
Input the number i.e. 2
The number input should go to the cell C5 in this example
Next question should be "How many for John"
I want to input the number 3
The number 3 should go into cell F5
How many for Jim
I need to input a number
The number should go to cell I5
How Many for Jerry
I need to input a number
The number should go to cell L5

I would also like the same function for the "How many won" button.

View 4 Replies View Related

Prompt For Data Input When Other Cells Are Populated

Feb 7, 2008

I would like to create an spreadsheet that prompts me to input data into a cell (eg; 'C1' - 'Quantity Ordered') as soon as another cell on the same row becomes populated (eg; 'A1' - 'Item Code'). I need this function to apply for several rows (25 rows in total), so that if data is then entered into cell 'A2', I get a prompt to enter data into 'C2', all the way up to a prompt for data in cell 'C25' when cell 'A25' is populated.

As it is imperative that I never forget to populate the relevant cells; I would also like to 'enforce' the prompt - perhaps by preventing the worksheet from being saved until the relevant cells have had data entered into them, or perhaps by using some kind of form, rather than a messagebox.

View 5 Replies View Related

Macro To Prompt Then Record Data Following Button State Change

May 10, 2007

I am looking to find a way and synthesize code that will prompt the user for text data when he/she clicks a radio button, then place that text data in a "Notes" worksheet within the same workbook. Given that there are multiple radio buttons, with options of "OK" and "attention needed" (it is a checklist of maintenance items), I also need to find a way to have each note listed sequentially in the notes worksheet. My questions: Is this possible using macros? Can you steer me in the right direction? (change event, inputbox, then what?)

View 3 Replies View Related

Transfer Commands To Command Prompt?

Feb 20, 2014

I need to transfer two commands to command prompt. The first one is always the same and it calls a command line of another application (BEAM). The second command is for the BEAM command line. It is taken from an Excel cell. The code I managed to write is transfering only the first command, probably because after execution of the first command command prompt is getting BEAM command line. I

[Code] .....

View 2 Replies View Related

Command Button To Send Data To Another Workbook

Feb 22, 2014

The data in 4 specific cells in C:UsersOfficeDropboxWB1 needs to (upon clicking command button) be copied to the next available blank cell in 4 specefic rows in C:usersOfficeDropboxWB2.

WB1 Specific Cells List
Sheet1!A4
Sheet1!Q7
Sheet1!N22
Sheet2!E3

Data from these cells are to be copied to the rows listed below respectively.

WB2 Destination Rows (Next available blank row)
Sheet1! Row B
Sheet1! Row D
Sheet1! Row F
Sheet1! Row J

I gather from reading other posts that sending this data within the same WB is fairly easy, is it easy to do between WB's though as i must have seperate WB's?

View 1 Replies View Related

Disable Command Button Once Data Is Recorded

Aug 7, 2008

I am making a timesheet which has a UserForm with textbox and 3 command buttons namely Search, IN and OUT. The program works like this, user type his id no., then clicks on search, once id match command buttons for IN and OUT are enabled. User clicks on IN button then current time which tags as NOW() will be pasted on the worksheet. Same goes with the OUT button. I was able to make them work that way. The problem here now is, the data being entered are vulnerable for data-re entry. What I mean is, if a certain user has already a recorded IN time, if he clicks on the IN time again, the data will be overwritten. Is there a way that once the user has already a recorded IN time, the IN button will be disabled for that user since he has already a recorded IN data?

View 14 Replies View Related

Command Button To Delete Selected Data

Feb 21, 2014

I have 9 columns with various data and true/false checkboxes. Column 9 is labelled "Delete" and also contains a true/false checkbox. If column 9 is checked (True) and then a command button is pressed the corresponding row of data is deleted.what would the command button code be.

View 1 Replies View Related

Using Input Box To Prompt For Name

Jun 17, 2008

I've not used Input Box function before. When a user opens my workbook I want to check whether a named range ("Name") is blank and, if it is, to prompt the user to type their name in an Input Box which then returns that value to the named range. This is what I have tried but I don't think I am referring to the named range correctly,


Dim strName
If IsNull("Name") Then
strName = InputBox("Please enter your name", "Name Required", "1")
Range("Name") = strName
End If

View 9 Replies View Related

Press Command But And Execute The Code Assigned To Another Command Button

Apr 14, 2009

Is it possible that when you press a command button, that the first thing it does is to execute the code assigned to another command button (IE in another sub).

View 9 Replies View Related

Copying Data As Values From One Sheet To Another- Using A Command Button VBA

Oct 9, 2009

I have a Sheet in which the data is calculated by changing the Sheet reference and also by the period..

Now I need to transfer this data as values, however there are certail cells which are merged and therefore I get a prompt as I cannot paste as values using Paste Special-> Values..

View 14 Replies View Related

VBA To Copy Data From Excel To Word - Command Button

Feb 26, 2012

When you click on a command button what would the vba code be to copy the data from the active excel workbook active sheet so that it ends up in the active word document?

I want the values from:
Cell A1 value in Excel to bookmark name "Text1"
Cell A2 value in Excel to bookmark name "Text2"
Cell A3 value in Excel to bookmark name "Text3"
to be copied into the active word document.

View 9 Replies View Related

Command Button To Print/enter Cell Data

Dec 29, 2009

Is it possible to create a command button to print the sheet, and, have a prompt come up and ask you to enter a date? Then that date is entered in a cell and the sheet prints? Just not sure where to start. I know how to make the command button and get to the view code for the button.

View 9 Replies View Related

Input Box Prompt For Password

Dec 5, 2007

How The Vba Code Used For

My Excel File Name "eai.xls" ,when I Click The File , It Open The Sheet Name "menu" With The Inputbox Prompt:="put Your Id"
When The User Put The True Id , It Will Show The Input Box Prompt:="your Password" . If The Password True Will Activate The Sheet Name "data" .and Hide All The Menu Bar.

If The Wrong Id Name Show The Msg.box "re Enter Your True Id " ,that Also For The Wrong Password In Which If User Put More Than 3 Times Wrong , Will Close The Workbook And Exit File.

The User Persons Allow 10 Person Id . Keep In The Table Of The Sheet Name " Id And Password" The Id No. Are In The A1:a10
Password No. Are In B1:b10
This Sheet Name Is Hide And Protect

View 14 Replies View Related

Ignore Input Prompt

Apr 18, 2008

I run a macro to open multiple workbooks and run a macro within those workbooks. All worked fine until a message/input box was included in the individual workbook macros [that I cannot change] to notify the single workbook user when the macro had successfully completed and prompts for an “ok” input.

Can I get my macro to ignore this prompt and not wait for an input – I am currently clicking “ok” everytime it comes up on screen. Have searched help and forum but nothing jumps out.

View 9 Replies View Related

Input Prompt Page

Sep 10, 2008

I have eventually got my Worksheet up and running but now im trying to make things a little easier to complete. The plan is when the Engineer is on site he has to open the Excel sheet to check the tests he has to complete and then mark the results. this is fine but for vaildation he has to sign everthing etc... i made it easier so they only had to fill in one box and it would complete the rest but this seems to get missed more often than not.

SOOO

i want a Screen to pop up when some one opens my excel that says Enter name and contact details. then they submit this which updates the spread sheet with this information and then the engineer can continue as normal.

View 11 Replies View Related

Entering Data On Specific Worksheet Using Userform Command Button?

Mar 24, 2014

I have a combobox that is referenced to a named list 'ListReels'. There are only 8 choices (Reels 1 -8), and each has an accompanying worksheet in the workbook. The user selects a reel, then inputs other information. When an 'Enter' command button is clicked, I had like the data to be entered onto the next available row of the worksheet with the same reel name (eg, if reel 2 is selected from the combobox, then the data should be added to the Reel 2 worksheet on the next blank row.

View 4 Replies View Related

Making A Command Button Visible Based On Data In Cell

Oct 15, 2007

I have a data validation list in cell D11 on sheet "Data Entry" and a command button "btnMultipleProperties" that I only want visible if "Multiple" is selected in "D11" I have the below code in "This Workbook" in VBE but it doesn't work. What did I miss?

Private Sub Worksheet_Change(ByVal Target As Range)
With Sheets("Data Entry")
If [D11].Value "Multiple" Then
btnMultipleProperties.Visible = False
Else: btnMultipleProperties.Visible = True
End If
End With
End Sub

View 8 Replies View Related

Loop Macro. Prompt Input.

Sep 4, 2009

I have several hundred workbooks with multiple worksheets(15-35) that I am trying to tidy up, so the data can be entered into a database. Its my first attempt at VBA and between the forum and macro recorder I made an attempt which is below. I just can't seem to get over the last part. I have searched the forum but can't seem to find any relevant information. I have a couple of questions.

1. I need to be able to run this macro over all the worksheets in the workbook, so how can I loop it? All the worksheets are named differently i.e. peoples names.

2. In my code I have inserted 4 columns. These columns will be the only thing common between all the worksheets. A1 to A30 = Week number, B1 to B30 = Shift Number, C1 to C30 = Supervisor number. Column D is blank. I'd like to be able to be prompted to enter these 3 numbers at the start if possible? Can this be done in such a way as you are only prompted the once and not on each worksheet? I picked 30 rows because the amount of rows in each worksheet varies but never exceeds this. The end of my code "Delete rows where cell B is blank" will delete any excess data where 30 rows of week numbers etc are not needed.

Sub CleanCost1_1()
'
' CleanCost1_1 Macro
' Macro recorded 04/09/2009
'

' Delete Job Card Sheet
Sheets("Job Card").Select
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
' Delete Master Sheet

View 9 Replies View Related

Command Button To Copy And Paste Current Month Data To Sheet2 VBA

Feb 25, 2014

In sheet1 I have different dates include different month as well.

I want to copy and paste current month data to sheet2 with command button.

View 5 Replies View Related

Command Button Name / Sort By Command Button

Feb 3, 2010

How can I return name of a command button on click? I want to create some sort buttons on a sheet I will use regularly to speed things up. I thought if I could call each sort button by the column letter the button sits in I can use this in a single sub for all buttons

e.g the button sitting in column A is called "A". when i click the button, it returns it's name to a variable which I can then use to sort column A. I know I could create a seperate routine for each button but I was just trying to think of something neater.

View 2 Replies View Related

Run Command Button Click From Another Command Button

Aug 31, 2007

I have a userform with a button on it named But1. Is it possible to store But1 into a variable then activate the But1_Click action using a variable?

Dim strButname As String
strButname ="But1"

Now, how would you activate the But1_Click method using strButname variable. With listboxes you can use the Control(strListboxName) methodology?

This doesn't work, but gives you an idea of what I am trying to do.

Controls(strButname)_click

View 9 Replies View Related

Prompt User To Input Column Letter

Aug 23, 2013

Sometimes data comes in with various columns that need Concatenate.

I need VBA to prompt user to input which columns to use inside the formula:

Code:

'Place formula into A2
Range("A2").Select
ActiveCell.FormulaR1C1 = "=COCATENATE(D2&"_"&E2)"

'VBA to copy down formula until last row In my macro, D & E will vary, is there any way to make excel ask which two??

View 3 Replies View Related

Push Button With Input Box For Specific Data

Oct 18, 2007

I am wanting to create a push button function with a query attched that will allow the user to input certain criteria with the end result in sorting the column containing the criteria.

I have attached a sample of my form:

My desire is the user will have the ablity to push the button and a input box will appear and they will be able to enter the data to search for. And the column with sort showing only the information required.

What I am having difficulties with is creating the pop-up input box. A simple macro with a sort or filter will not work as the data criteria is not the same everytime.

View 13 Replies View Related

VBA Script In Excel To Prompt User To Input Date?

Sep 15, 2014

I have a cell (C16) that has a date format (such as 08/28/2014). I want the value of this cell to be "N/A" when cell C7 is "No". When C7 is "Yes", I want Excel to prompt the user to enter a date for C16 when they click on C16. The formula for cell C7 is =IF(C3="No","No","Yes"). That's where the value of C7="No" comes from. If I didn't need a date for the value of C16, the formula would be something like =IF(C7="No","N/A","______"). I have just recently started trying Excel macros due to a tool

View 9 Replies View Related

Dropdown List With Prompt Box To Enter Value And Hide Input

Feb 5, 2013

I am looking to allow a user to enter a unique value when a drop down value is captured from a list i.e 'Other' (Possibly a pop up box), then I require this value to be hidden and calculated along with others to show the average (The average calculation obviously wouldn't be in the same cell).

View 8 Replies View Related

Command Button Click Creates New Rows Above Button?

Nov 8, 2012

I currently am using a form button to create new rows.

I need two different kind of buttons. I have a button that does this-

VB:
Sub InsertRow()
'this inserts a row where the button is clicked.
Dim r As Range

[Code]....

However, when I try and create these codes using a Command button (I need it for the color), I get the error

"unable to get the buttons property of the Worksheet class"

P.S one other thing, say the button is in row 3, and Cells A1 and A2 are merged, when you click the button in row 3, it should extend the merge to A3.

View 4 Replies View Related

Command Button - Create A Save Button In Sheet 1?

Mar 9, 2013

i want to create a save button in sheet 1, on clicking the same the data entered in the particluar cells of sheet 1 should get saved in sheet 2 in given format

View 1 Replies View Related

Macro Works With Form Button But Not Command Button

Oct 5, 2006

This is probably really straight forward but cant see why it happens, the following macro works fine when called by a button created by the form toolbar but doesnt when called by a command button, get the runtime error 1004, "select method of range class failed"

ActiveSheet.Select
Range("B4:B37").Select
Selection.ClearContents
Range("G4:G37").Select
Selection.ClearContents
Range("B1").Select
Selection.ClearContents
Range("D1").Select
Selection.ClearContents
Range("F1").Select
Selection.ClearContents
Range("J1").Select
Selection.ClearContents
Range("M2:M3").Select
Selection.ClearContents
Range("B4").Select
ActiveWorkbook.Save
Application.Quit

View 2 Replies View Related

Print Button Macro Prompt?

Mar 23, 2014

I have a print button or object and I want to assign a macro to it that when clicked brings up a prompt to type in a Month or Year to Date and prints the data that corresponds to that month or YTD. I have a Date column in a table that I can get a different macro to print by basially having the macro filter by blanks, so essentially printing all the dates in the table, but I feel as if it could be much better and simpler by prompting the macro to filter by "x" Month and print.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved