Popup Input Box Within Nested If?
May 1, 2012
I'm trying to create a nested if statement, which given a certain condition, will pop up an input box to grab a user-defined value as follows:
Public Function DetermineCost(ManipulationType As String, Manipulation As String, Value As Single) As String
Dim SkillCost As Single
If ManipulationType = "Improve" And Manipulation = "Damage" Then
DetermineCost = Value * Sheet1.Range("N74").Value
ElseIf ManipulationType = "Improve" And Manipulation = "Resistance" Then DetermineCost = Value * Sheet1.Range("N75").Value
ElseIf ManipulationType = "Improve" And Manipulation = "Physical Skill" Then DetermineCost = InputBox("Enter GM Cost")
[code].....
The code portions in red are not working properly. I also have the "No Value" if statement not working which I'm not sure why, but the main function I'm trying to figure out is how to popup an input box where a user will input a value when Manipulation = "Physical Skill" or "Non-Physical Skill".
specify the input box data type, that would be amazing. I tried InputBox ("Enter...", Type:=1) but VBA didn't accept that as a value. and yes, I recognize that SkillCost is not currently utilized. I plan to utilize it once I figure this stuff out.
View 4 Replies
ADVERTISEMENT
Jun 12, 2009
I wanted to change a column text to call intial Caps. I found this macro code on the microsoft web site
Sub Proper_Case()
' Loop to cycle through each cell in the specified range.
For Each x In Range("C1:C5")
' There is not a Proper function in Visual Basic for Applications.
' So, you must use the worksheet function in the following form:
x.Value = Application.Proper(x.Value)
Next
End Sub
I need to change the macro to have a input box (asking what column to convert text to initial CAPS)
View 9 Replies
View Related
Nov 22, 2011
I am new in Excel VBA and working on developing a form for Quarterly Reporting. My userform (Quarterly Report) contains controls such as combobox (one of them). I am trying to have another Userform (Risk and Mitigation) to pop-up when a specific item is selected.
Example:
With cboRiskScale
.AddItem "High"
.AddItem "Moderate"
.AddItem "Low"
End with
cboRiskScale.Value = ""
I am looking for the code where I will be able to have the "Risk and Mitigation" userform pop-up for user input when the "High" is selected.
View 7 Replies
View Related
Feb 22, 2014
I have a spreadsheet with 5 columns. A1 to A5
Entries are made into columns A2 to A5 but only ever one entry across all cells
If an entry is made into A2 to A5 the I need a "P" to be placed into A1
View 4 Replies
View Related
Jul 24, 2014
I am trying to create a macro which gives me an input box. I need to enter 2 numbers into the input box. It would be as follows:
Input Box Msg 1 - "What is your labor cost?" (NUM1)
Input Box Msg 2 - "What is your productivity rate?" (NUM2)
Then I need the macro to take this info and enter it into a formula which changes according to the row which you are on. (I need the macro to work based on which ever cell I currently have selected). The formula would be this if I currently had a cell on row 10 selected:
=(NUM1*(NUM2*$H10))/$H10
So, if I currently had cell L10 selected, and I ran the macro and put 100 in for "NUM1" and 10 for "NUM2" and my sheet had 20 in cell H10, then the macro would enter the number 1,000 into cell L10. If I had L500 selected, then the macro would enter the final number into cell L500 based on what value H500 contained.
View 9 Replies
View Related
Jun 8, 2014
I would like to know if it is possible to transfer values of cells this way?
I've attached the excel file for easier reference.
View 3 Replies
View Related
Jul 4, 2006
I have to design an input user form (a button that opens an input box or dialog box), which asks user to "Enter number of "columns"".
User enters a number i.e. 2 or 3 etc
It then asks user for the headings of these coulmns and places first column heading in A1 and second column heading in B1, third in C1 and so on ...
View 9 Replies
View Related
Oct 7, 2008
In cell a3 user selects yes or no. Then in cell b3, if they selected yes for a3, a pop up box should appear which asks for a value (1-100), and if they selected no for a3, then b3 automatically becomes zero. How can I do this.
View 9 Replies
View Related
Jan 8, 2010
I have a macro that deletes the row where the active cell is on. Works perfectly.
I want to have my macro display a pop-up box that gives the user the option to either delete or not delete the row.
I would like the question to read . . . Are You Sure You Want To Delete?
View 6 Replies
View Related
Feb 28, 2007
I am just starting to get my feet a little damp with VBA and I am trying to make a macro that will act whenever any text is entered in any cell within a 3x3 square. Whenever any text is entered in any of those cells I would like it to enter a text ( "X" ) in a cell which is specified by a cell in the spreadsheet (this cell will output which cell the macro should write the text in in this format "A:1" or "C:3"). How can I make the program act only in reaction to the user entering thier text, and also, how can I get the macro to read A:1 and enter the text into that specific cell? Any help would be so awesome, the book I have is really difficult to navigate.
View 9 Replies
View Related
Nov 2, 2007
I'm trying to write a code (and I have little to no knowledge of VBA!) so that when a line is inserted onto any worksheet in the workbook a msgbox appears....
Trying to get it myself I created this- it's probably COMPLETELY wrong, like I've mentioned I have little to no knowledge and just using websites/other codes I've seen to put this together... o.O
View 12 Replies
View Related
Oct 6, 2008
Borowed This Code From The Site And Indeed It Comes In Very Handy .....
View 9 Replies
View Related
Nov 3, 2008
How do you create a pop-up box that opens every time a specific worksheet is activated that asks "What was the first month of activity?" The month that is entered needs to populate in Cell "A7". I also want the 11 months following the answer to the above pop up box to populate in cells A8-A18.
View 7 Replies
View Related
Dec 8, 2008
to create a macro that will launch a pop up box once cell B5's value is equal to "3".
I need the pop-up box to say, "You win the game!"
View 10 Replies
View Related
Jun 2, 2009
Is it hard too add a popup calendar too my date box. Can it go too year 2075?
When you open the calendar you could click on date too install.
View 3 Replies
View Related
May 23, 2007
I'd like to have a warning message pop up if the value of column AF is 3 or less.
Column AF is counting entries in columns E:I by using the formula
=COUNTBLANK(E1:I1)
to create the value
A value of 5 is OK (no data in E to I), and 4 is also fine (just one entry in E to I) A value of 3 or less, indicating more than one column in E to I having data, needs to display the message. Presently I have a conditional format on another column to display red background when AF is 3 or less, but it's a little ambiguous, so a message would be neater!
View 9 Replies
View Related
Aug 16, 2007
I like to know if this can be done. The entry of data for cell A3 is from a pre-determined list. I like to create a Userform to allow the user to select from this form. the idea is to have this form popup whenever cell A3 is selected.
View 9 Replies
View Related
Dec 9, 2008
Codes are entered manually only in Column A starting at A1..A10000+ ranges.
As Unique codes are entered ie. 1234 or 2345 or 3456 in the next empty cell down,
I need a specific popup message for each of the three codes instructing the user what to do next.
View 9 Replies
View Related
Nov 18, 2009
I script that on open would pop up asking if a sync was done with an option for yes or no. If yes is pressed then it would just open, if no selected it would give a message "must sync before use" and close the workbook.
I do not want this message to pop up when other spreadsheets are open when this one is still open so im guessing private workbook_open
View 9 Replies
View Related
Nov 25, 2009
I am designing a program which basically calls another program for all dates back to a specified time. Certain dates will not have data and there will be a pop-up message saying something along those lines.
What I want is a way for VBA to "know" there has been an error message (so I can set a boolean to true or false so I can do an if tree) and then also a way to click "OK" to proceed through the error message.
View 9 Replies
View Related
Apr 8, 2013
I've got a data sheet (called "data") which contain a bunch of data, if someone edits the data manually then a msg boxpopups. which i've done using the code below in the code on that tab. However, I also have vba that places data on the tab that also triggers the popup message.
So how do i make it such that if the vba is run then the popup doesnt appear but if they edit the data manually then it does?
VB:
Sub Worksheet_Change(ByVal Target As Range)
Dim WatchRange As Range
Dim IntersectRange As Range
[Code].....
View 3 Replies
View Related
Nov 18, 2009
Is it possible to create a popup window that contains drawing objects?
I created a "form" with the objects, but I don't know how to use the form.
I want to have this image, or form, or whatever it is, to popup when the user clicks a cell. Is this possible without getting into programming?
Can it be hidden and then made visible when the cell is selected?
View 8 Replies
View Related
Dec 31, 2009
I'm modifying a template that originally shipped with Excel 2003 (I have not upgraded to 2007). In the template, there is a pop-up box (not a dialog box) that shows up when I'm on certain cells. I've attached an image of it. It's the yellow box containing the words "Company Information..." etc. I cannot find any way to remove it! It's not a comment, and selecting it doesn't allow you to edit it. What is it, and does anyone know how to remove it?
View 2 Replies
View Related
Feb 23, 2010
I want to create a pop up message showing count of cells turned red,each time the workbooked are opened.like column "I" has two dates in red colour,so the pop up will say "you have 2 contracts expired"
View 8 Replies
View Related
Jul 4, 2014
I followed this guide for a popup calendar
How can adjust this so the calendar popups to the right of the cell thats called it. At present it just pops up in the middle of the screen.
View 1 Replies
View Related
Jul 9, 2014
I need to improve this project i've created. right now this project is an Exam for our agents. You can try it first if you want. I've attached the file below.
I need putting a timer that will compute the seconds or minutes it took the agent to finish the exam. timer should start after they click "Take the ETP" button. And finally, creating a screen / a pop-up that will show the ff example.
[I]EXAMPLE:[/I]
Name of Examinee
Answer:
1. A = Correct
2. B = Incorrect
3. A = Correct
4. C = Correct
5. D = Incorrect
Testv2.xlsm
View 11 Replies
View Related
Sep 23, 2008
I have an excel, in which the user can input values and the sum will be computed for each column (i.e. =Sum (L2:L29)) . I want to alert the user when the computed sum exceeds a particular value, else it shud proceed.
It can also be done at while the save & close of the workbook.
View 10 Replies
View Related
Oct 10, 2008
using this code ....
View 14 Replies
View Related
Mar 27, 2009
I would like to have a question box pop up w/Yes and No Buttons at the start of my macro to choose between two different sub routines. Therefore, MsgBox would say: Import New Yard Inventory?
If Yes, then it would run the alternate subroutine. If No, Then it would run macros normal routine. Not quite sure how to do this. Would the msg box have to be a form box where, a representive value would have to get filled into a cell? Then
reference if cell value is true ,then or would it register the value to memory so then, the code would have to to call the given value then run code if value it true?
View 3 Replies
View Related
Jun 4, 2009
This file works perfect on my main computer, but will not work on my wifes machine. Both machines have the same Excel program. Maybe I have downloaded a addon, just not sure. On the machine that it does not work I get Could not load object because it is not available on this machine.
View 3 Replies
View Related