Inputbox To Appear Asking The User To Enter An Amount
i need an inputbox to appear asking the user to enter an amount(we'll call XX).
Now the code will find that value in Column F, and delete the row that contains the value XX in F
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Can Inputbox Have Selections For User?
I have not used Inputboxes or Userforms much. I have read through some of the messages here, but I need to learn more about them. I need to create some type of user interface, where the user would be asked to select between two choices. Based on the choice made, a macro would be executed. The two choices run different macros. I need direction or an example of an Inputbox that shows two choices instead of a blank input space.
View Replies!
View Related
Double Click To Enter User ID
i have some code that allows my users to enter their user ID on double clicking. The worksheet code below shows how on double clicking into Colum 3 (If Target.Column = 3 Then) then the user ID will appear. Q: How do i get the code to work in Columns 3, 5 and 7 but not those inbetween?! I tried using "or" but it allowed the ID to be entered into all columns! i.e. 3,4,5,6 and 7 which is not what I require. In short I need the ID to appear on double clik into every other column. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim user As String 'This refers to the function ReturnUserName, which takes the name from the NT environment If Target.Column = 3 Then Target = ReturnUserName Cancel = True End If End Sub
View Replies!
View Related
To Force A User To Enter A Numeric Value
I'm trying to force a user to enter a numeric value, (one numeric value between 0 and 8, inclusive) into a range of cells, prior to exiting the spreadsheet. The range would be D7:D252, and a single value would have to be entered into each range prior to exiting the spreadsheet.
View Replies!
View Related
Forcing A User To Hard Enter Into A Cell
Is it possible to lock a cell so that the user must enter the number manually as opposed to using a formula. There is a cell on one of our spreadsheets that the user should be hand entering the numbers from the general ledger this is done to ensure that the general ledger balance is the same as the spreadsheets totals. However most of the user insert a formula that just copies the number from above into this cell that should be hand entered.
View Replies!
View Related
Enter User Form Data Onto Spreadsheet
I have 4 textboxes that the user enters data. I then have a button on the user form. i would like to write code so that when the user hits the button... Textbox1 data goes into active cell Textbox2 data into the cell below Active cell Textbox3 below it and textbox4 below it then close the user form.
View Replies!
View Related
User Form That Pops Up When I Enter ‘Y’ In Cells
What I am after is a user form that pops up when I enter ‘Y’ in cells in Column ‘L’ which displays the contents of the cells in that row e.g. if I enter Y in cell L2 a user form would pop up displaying the contents of cells A2 to M2 The A2 to M2 column headers are:- First Name Surname Code Address line 1 Address line 2 Address line 3 Address line 4 Address line 5 Post code Telephone Comments The user form can be Read only i.e. I do not need to edit the cells (although that would be good) as it will be used as a source document to input into another application, however, a ‘Print’ button to print the form would be beneficial. The only other button required would be a ‘Close Form’ option.
View Replies!
View Related
Use Of Enter Key On A Calendar User Form
I've created a calendar user form, much like many of the examples I seen posted here. I've tried all that I could find but none would allow the user to use the Enter Key to make the selection like the mouse click. I would like the use of the Enter Key to produce the same results as a Mouse Click.
View Replies!
View Related
Allow User To Enter Break Mode (Debug)
i want to do is throw a break in my vba code if the user selects yes through a msgbox vbYesNo prompt and proceed in debug mode. is it possible to code in a break point in this fashion? my desired pseudo if user selects yes: set break point (to send to debug mode at that point... i dont mean to end the code with a END statement.) if user selects no: proceed program normally
View Replies!
View Related
Inscribing Cells: Run A Macro On Enter Keypress, That Would Execute Different Code Depending On That "inscription" That Would Be Invisible To User
Is there any way to "Inscribe" a cell? I would like to run a macro on Enter keypress, that would execute different code depending on that "inscription" that would be invisible to user. I could use some properties of . Validation property like this: Private Sub EnterPressed 'following code to ensure proper functioning of Enter in any other Worksheet If ActiveSheet <> mySheet 'MySheet is global Variable then ActiveCell.Offset(1,0).Select exit Sub End If 'now the real code If ActiveCell.Validation.InputMessage = "1" Then ActiveCell.Offset(0,1).Select Else 'something else End If End Sub The problem is, I use Data Validation and Conditional Formatting, so can't use any of these properties.
View Replies!
View Related
Reference Cell & Add Amount If Positive & Subtract Amount If Negative
Im trying to set up an active running inventory sheet where: (A)the progressive daily sheet cells reference back to the corresponding master sheet cells fluctuating the master values, (B) the same progressive daily sheet cells reference back to a cummulative totals-cell based on whether I added or subtracted inventory. I want to make a copy of the blank "sheet 2" with all of the formulas and move it to the end of the workbook each day and enter new values which will reference back to the master sheet so that I can click on a date sheet and see an individual day's values or click on the master sheet to see the fluctuating inventory on-hand and the cummulative +/- totals of all days combined. I've got a couple hundred individual cells to reference. I've tried and tried but I can't make it work. Heres what I need to do: I need to reference individual cells from "sheet 2,3,etc" back to a corresponding cell in a master sheet. But I need the values in each cell in "sheet 2,3,ETC" to increase or decrease the corresponding cell values in the master sheet. For example: If the value in the master sheet B5 is 200. Then in sheet 2, I enter +50 in B5, I need the master sheet cell B5 to increase by 50 to 250. I also need a way to decrease the cell value in the master sheet B5 if I enter a negative value -50 in sheet 2 B5. I also want to know if I can reference the same cell values entered in "sheet 2,3,etc cell B5" back to totals columns C5 for adding inventory or D5 for subtracting inventory in the master sheet where the master totals columns would reflect cummulative totals added or subtracted. For example: if the value in sheet 2 B5 is +50, then the value in Master sheet C5 would add 50 to a progressive total. But if the value in sheet 2 B5 is -50 then the value in master sheet D5 would add -50 to a progressive total.
View Replies!
View Related
Prevent The User From Saving The Data Input From The User Form If Any Of Those Three Fields Is Left Blank
I have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires. What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)
View Replies!
View Related
Logon Box - User / Pass - Unique Actions Per User.
I have a workbook that is used to track overtime hours worked through the year. I've received some help from users on this forum, and others, to create the necessary macros and formulas to allow a supervisor to make use of the form; however, the workbook is also used to track those that wish to volunteer to work overtime each weekend. The sheet has a list of names for the employees on each shift, then a column to allow a "Y" to be placed under the date - designating them as a volunteer for any overtime available. I've found this spreadsheet (attached - from this site) that will allow individual users to access the workbook and have unique passwords for each. I don't completely understand how it works, but I feel it may be a start to getting what I want. Essentially, once the user selects their name and inputs their password, I'd like the workbook to be opened and then allow them to only manipulate the row associated with their name. That row will change from week to week, so specific numbers will not be able to be used, but their name will be the same as the name used in the logon. I feel like I'm asking for a lot here, so just some initial guidance on whether this type of thing is possible would be an acceptable answer.
View Replies!
View Related
InputBox In Macro
I have a macro that sends data from excel using MS Outlook. I want to add a more specific Subject header in outlook, and do this using an input box. I thought adding something like this would work, but it doesn't... (below are just extracts from a very long code...) Dim CurMonth as String CurMonth = InputBox("Please enter the reporting month","") .Subject = "Trial Balance - All companies" & CurMonth When outlook generates the email, all I get in the subject line is "Trial Balance - All companies"
View Replies!
View Related
Two Option InputBox
I am trying to simply the data input for someone who is not very experienced. I have had some success but need to have an extra option in case of mistakes. Ideally I need the following - I want an inputbox that will appear when the user starts the macro and for example asks Enter Surname Then I know what I want but I don't know how to do it. I want a box to display the Surname that the user typed into the inputbox with a message asking Are Details Correct? with a Yes and No Button. Clicking the Yes button moves onto the next inputbox clicking the No button cancels the whole macro before it enters data into cells.
View Replies!
View Related
VBA Inputbox
I have another dilema. I am writing a macro that essentially takes a template from a workbook and copies it to another workbook that already has data. the data is then imputed into the pasted template through the macro... my dilema is that I have numerous data sheets so at the begining of the code I need the macro to pause so the user can manually select the cell or range that the copied template is to be pasted too... I was thinking an inputbox would work but I am unsure how to write this part of the code.
View Replies!
View Related
Saving As A Workbook Through Inputbox
When the button is pressed, It opens a Mesage Box giving an alert to the User about what is He going to do...if he clik no the macro stops, if the user click yes then it opens an InputBox ....and the name the user writes there will be the name of the new book... If working good if the user press OK ...my problem comes If the User press CANCEL in the InputBox...The excel try to Save the file as FALSE...and I don´t know how to avoid it. Here is the code. Sub Botón1_AlHacerClic() X = MsgBox("Warning Bla bla ".Are you sure ?", vbYesNo, Title:="IMPORTANTE") Naa = Application.InputBox("Write the file name Here", "New File Name") If X = vbYes Then ChDir "C:UsersROBERTODocumentsBASES DE DATOS" ActiveWorkbook.SaveAs Filename:=Naa, FileFormat:=xlNormal _ , Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False End If End Sub
View Replies!
View Related
Inputbox To Exclude Data
I need to have an inputbox for users to enter multiple store numbers. What I need to do is actually filter out the store numbers that was entered into the inputbox my code so far is: 'Inputbox to filter out new stores Newstore = InputBox("Enter New Store Numbers seperated by a space", "Enter New Stores", "119 120") x = Split(Newstore, " ") For i = 0 To UBound(x) Range("A1").CurrentRegion.AutoFilter Field:=2, Criteria1:=Array(x) _ , Operator:=xlFilterValues Next i
View Replies!
View Related
InputBox Matche A Name In Column
I am using this code to delete cells from a spreadsheet if the employee name entered in the InputBox matches a name in column D. Does anyone know how I can amend the code so that if the user enters a misspelled name for example, there will be a message box warning ("Invalid Name Entered!"), which the user can press OK and return to the Input Box and try again. Sub deleter() Sheets("Staff").Select Dim Name Name = Application.InputBox("Please enter employee name", "Staff Termination") If Name = "" Then MsgBox "No name entered" If Name = False Then End If................................
View Replies!
View Related
Validate InputBox Entry
validation up to the point that the user can click cancel and exit, also when nothing is entered a msgbox appears and for the 3rd inputbox a value greater than 0 must be entered. Sub Trajectory() 'Trajectory macro t0 = InputBox("Enter a value for the initial time(t0)") 'If t0 = "" Then MsgBox ("You must enter a value for t0!") 'Exit Sub tf = InputBox("Enter a value for the final time(tf)") 'If tf = "" Then MsgBox ("You must enter a value for tf!") 'Exit Sub Dt = InputBox("Enter a value for the time increment(Dt)") 'If Dt = "" Then MsgBox ("You must enter a value for Dt!") 'Exit Sub 'If Dt = 0 Then MsgBox ("You must have a valid increment") x0 = Val( Range("F4")) v0 = Val(Range("F5")) g = Val(Range("F6")) y0 = Val(Range("F7")) q0 = Val(Range(" F8")) Selection.Formula = FILL_TABLE End Sub
View Replies!
View Related
Insert X Rows Via InputBox
I wanted a macro to insert (the number of rows from Input box) below the active cell. Searching the forums, I found the following code. Sub InsertRows() Dim Rng Rng = InputBox("Enter number of rows required.") Range(ActiveCell.Offset(1 0), ActiveCell.Offset(Rng, 0)).Select Selection.EntireRow.Insert End Sub If I enter a number it works fine, but if you click on the cancel button or the X to close the Input box, I get a Run-time error (13: Type mismatch). If you enter zero, it inserts 2 rows above the active cell. I tried to modify another macro, I found on the site, that inserts rows and copies the row above, but always get the Message Box "You didn't specify a range!" Sub InsertNumRows() ' Dim Rng As Range Application.DisplayAlerts = False On Error Resume Next Rng = InputBox("Enter number of rows required.") On Error Goto 0 Application.DisplayAlerts = True.............................
View Replies!
View Related
Get Default Value From Cell For Inputbox
I am working on a production spreadsheet, and I'm trying to figure out the easiest way for my coworkers to enter data into the system. Each shift, we produce from 5-20 different varieties of chips, and we keep track of how much we've made of each. I've decided that a simple ADD and DEL button at the end of each row will work (unless anyone can think of something easier or better, let me know pls). Cell G3:G30 is where data will be stored for each variety. The default value for each variety is stored in column C. I found a very basic macro that adds a value to a selected cell, but I wish for it to find the default quantity for the variety in that row (changes day to day as per our schedule), and add it to the value in column G. The DEL button will do just the opposite. I have 3 worksheets that I need this macro in as well (days, afternoons, midnights), but I don't think that will be any problem. I've searched around for a solution, to no avail.
View Replies!
View Related
Inputbox For Simple Verification
I have a VBA userform with various textbox fields like 'Name' and 'Address' and 'Amount' I would like an input box to pop up that asks the user to 're-enter for verification' So that they have to type the same thing twice, to protect against typos How do I code it so the program compares the inputbox to the textbox and passes only if they are identical? (or even, using two inputboxes instead if that would be easier)
View Replies!
View Related
Automating File Name Via Inputbox
I am trying to do is have the code display an input box asking the user to type in the file name, or generate this automatically? to an existing folder in a drive My master file, imports data from another source (excel file) pastes it in the necessary columns at the moment, however the file is run every Monday so the file name is generic, last week was 10723, this week will become 10724 when the data is run next week, Can I do what I want to? Via either an inputbox for the file name, or by using something so the file name becomes “107 “ & Weeknum(today()-3)
View Replies!
View Related
Inserting Rows From An Inputbox
I have a store report, which every now and again needs to have a new line added for a new store that has been opened. I need a inputbox to display so that you enter a "store number". Once you enter the store number, the macro adds a new line to add the store number in numberical order.
View Replies!
View Related
Inputbox To Open A File
I have workbook and when I open it I'd like to be able to open another workbook and copy the data into a new sheet in original workbook. The file I'd like to open is always "123_PPS.CSV". I'd like to enter the number (123) into a msg box and then have that file open or copy into sheet2 so that I can get info from it into the cells in the packing slip.
View Replies!
View Related
Referencing A Sheet From An Inputbox
I have a quick question that'll hopefully have a quick answer. Part of my workbook requires an input box to appear. When you type the name of one of the worksheets into the box and hit enter I want a VLOOKUP formula I've written to compare to that worksheet. Heres what I mean, with some descriptions of what i would like:
View Replies!
View Related
Determine Cancel On InputBox
I am facing a problem while validating an Inputbox actually the issue is that when user press Cancel button on Input box it returns a empty string and also when user does not enters anything in Input box and pressess ok than too a Empty string is returned . Than how we will apply the following conditions : 1) If user does not enter anyting in InputBox and pressess OK than a msgBox should appear saying that "Uhav entered empty string and than looping back to inputbox" 2) If user pressess Cancel procedure should End Sub try() Dim Path Path = InputBox("Specify Path" , "Report Path") If Path = "" Then ' Issue comes here becuse anyways code reahes here if user either lefts the Inputbox empty and presses ok OR user pressess cancel as i need to show different actions for 'different conditions End If End Sub
View Replies!
View Related
Getting All Days Of Month From Inputbox?
Need a way to get/calculate ALL of the days of the months from a date range entered into an inputbox in which a user may enter any day of a month? In other words, the user enters 9/14/2009 in the first inputbox then 10/8/2012 in the second and code would calculate the number of days as 9/1/2009 - 10/31/2012. Here is the current code I'm using that calculates only the exact days:
View Replies!
View Related
Insert Text Into An Inputbox **
I have the following code that allows a user to type in an email address into an inputbox, and email a spreadsheet to the recipient in the input box. However, as 99% of the time this is going to be the same email address every time, can I populate the inputbox automatically with a given email address? for eg email@email.com vaRecipients = Application.InputBox("Please enter recipient's email address. Please ensure Lotus Notes is open before sending.", "Email Literature Request")
View Replies!
View Related
Manipulating InputBox Variable
I have two inputboxes. I want to set the default value of the second inputbox as (effectively) one cell down from the first inputbox entry. In other words, if I type G17 into the first inputbox, I want the second inputbox to then have a default value of G18.
View Replies!
View Related
Inputbox Method And Ranges
I am having trouble assigning the range given by an inputbox method to the variable targetcells, and subsequently selecting targetcells. any help would be most appreciated. Dim i As Integer Dim CopyCells As Range 'the cells into which links will be copied Dim TargetCells As Range 'the cells that copycells will be linked to Dim CopyAddress As Variant 'the address of the copycells Dim TargetAddress As Variant 'the address of the targetaddress i = 0 For i = 1 To 100 Set CopyCells = Application.InputBox("Click on the cells to copy", "Automating copying links", Type:=8) Set TargetCells = Application.InputBox("Select the target cells", "Automating copying links", Type:=8) TargetCells.Select 'this line doesn't work for some reason (why?) TargetAddress = ActiveWorkbook.Name 'this and the above lines are the ones I am having most trouble with - assigning the name of the targetcells workbook
View Replies!
View Related
Manipulate Inputbox Text
I have a macro that takes input from the user and replaces certain text on several worksheets. One of the inputs is a username in the format of firstname.lastname. I need to manipulate this input such that the dot is removed and the first twelve characters only are used, all in upper case. e.g. Michael.Jackson would become MICHAELJACKS I know how to use cells.replace to replace the text but I don't know how to use a formula to manipulate the inputbox text before I do the replace.
View Replies!
View Related
|