I am attempting to pass a boolean variable between two macros. The SUBMIT macro calls the STATUS macro to do some verifications and the STATUS macro should return the boolean variable RDY back to the SUBMIT macro, but does not.
I am using Excel 2007. Both macros are in the same Module. The STATUS macro is called from several places in the code.
Public Rdy As Boolean Sub Submit() [code] Call Status If Rdy=True then msgbox("You have completed your form") else msgbox ("Not ready") [code] end sub
Im trying to make a formula that lets you type in your current level, and then calculates how much XP you have remaning untill you reach the max level.
The way the forumla would need to work would be something like this:
(E10) Enter Current Level: (F10) 37 (which is my current level) F11 - would then add cells from C37 to C70 (calculating the total amount of XP required) and then display in (F11)
Being able to say if, then is far to cpmplicated for me in excel. I'm just trying to make this for a bit of fun and am sure one of you talented people can easily do this.
I'm trying to create an array formula that returns all the cities in a given state by imputing the state's abb in cell K2. The returned cities go into column J. California has the most cities(430) and the cities are 5000 rows deep.
I have a timecard spreadsheet which im working on, each employee is represented by a single worksheet in the workbook, and the worksheet is named after the employees name. New employees are added by filling in a form which dynamically creates the timecard based on a template. Im trying to impliment a 'Fire Employee' button which sits on each employees sheet and can be clicked to set an employees working status to false by changing a boolean variable called 'fired' to true.
Ive been looking around the forum but I cant figure out if i should be using public variables or where exactly i should be placing them, so that each employees 'fired' status is set to false when the worksheet is first created, but can be set to true when the 'Fire Employee' button is clicked, this must only set true for that specific employee, and not all employees. If your wondering why i need this, the employees work status will be used on other forms to toggle views etc so thats why a boolean approach is best (at least i think it is if its not to difficult to do)
I have minimal excel knowledge, but enough to get by. I have 2 years in C++ programming.
Here's what I'm trying to do:
I'm trying to create a workbook to keep track of flags we send out, and receive back. We have a lot going and coming, so I figured the best way to do this would be to break down each region on different sheets. But I need to create a check box that says something like, "Yes/No" or "Here/Gone" or something like that. THEN, I need to take that information, and put it on the front sheet of the workbook so I know how many we have in/out total. Does this make sense? I know how I would program this in C++, but excel is a bit different.
once bTest is declared as a Boolean, it becomes equal to FALSE (I checked this after much head scratching). How does one assign a value to a boolean variable only after you make your test.
Sub foo()
Dim bTest As Boolean
If Range("a20").Value = False Then bTest = False '
I need help creating a code that does the following:
I want a Boolean variable (TheTD) to be True when and only when the value in cell A1 is "TwoOnly". Once it isn't then I want the Boolean to be immediately False. Once cell A1 is "TwoOnly" I want TheTD to be true immediately as well.
I am using a userform and the textbox1_Change macro can change the value of cell A1 while typing. So in other words The Boolean can be changed from True to False multiple times depending on what I type in textbox1.
I would like to construct in VBA "n choose r" Boolean arrays of length n which will give all possible combinations of these variables as you scroll through the arrays.
Typical values of n and r would be 40 and 5 respectively and I'm looking to get the fastest possible output on these 660,000 or so arrays.
I have been playing around with various "for, to" statements but haven't managed to turn out anything meaningful thus far.
I have cells in my Excel sheet that contains boolean values, ie. the values TRUE or FALSE. Is it possible to format these cells so that FALSE is written with red color?
Seems like this one should be pretty easy but I'm stuck... I just want to return a boolean based on whether the currently active cell contains the character "#". I've been trying to use the find method but I can't figure out how to convert a match or lack of a match to a boolean.
I have strings in cell a1. I will put a formula in a3 if string "xyz" is found inside a1, it will show value from a2, else shows nothing.
i tried simple formula cell a3 =if(a1="xyz",a2,"") here it is exact match, i need partial match, or multiple partial match in a single cell. How to do it?
I've created a combobox. It is assigned a certain array of Long Values based on various criteria. I want to set the value of the ComboBox to empty before the criteria are assessed. What is the initial value of a ComboBox? zero, null, or ""
I have declared arrays for the variables in the code segment below. There is however a problem with the way I've initialized C and F as I the compiler stops C(1) and displays the message: "Compile Error: Expected Array." For the calculation to proceed correctly, the first values of the C(i) and F(i) arrays need to be one and zero respectively.
Is there a way to initialize these variables to these values?
I want a boolean function to return whether the PC is connected to the Internet. How to start creating this.
Reason:
I have code that checks an online database and downloads data after the user presses a button.If the host computer is not currently connected to the net, I would like to display a message of my choice instead of trying to run the code.To determine whether to run my message or not, I need a function that will return TRUE/FALSE if the host PC is net connected or not.
i need someone that can think through this boolean logically. its been a long day at work and now I'm trying to walk through this boolean thing to make sure my data will post on the right pages.
I have an Excel Macro that will capture inputted customer/vehicle data from an input screen, at the end, based on questions answered, i need to place that data on 1 of 4 sheets in my excel document.
The questions are: Is this a Nationwide claim? (Y.N) (boolean = nw) Is the vehicle here? (Y/N) (boolean = vh)
So here's what i got if NW = true and VH = True then place data on "sheet1" if NW = true and VH = False then place data on "Sheet2" if NW = False and VH = true then place data on "sheet 3" if NW = false and VH = False then place data on "sheet4"
I can't think of how to write this IF statement for this to happen. can't get the logic going.
I'm trying to figure out how to reorganize data based on boolean values in two different columns. My goal is to write something in VBA that will look to see if the boolean in the first cloumn is true then procede to check if the boolean in the next column, same row is true. If that is the case, it will take several values from the row and move them to another worksheet. If the boolean in the first column is true, but the second column is not, it will look down the rows of the second column until it finds true then move several values from rows it has passed through. Here is an example of the sample data I will be dealing with.
Date Time Duration Boolean1 Boolean2 6/22/200715:0032TRUETRUE 6/22/200718:0058TRUEFALSE 6/22/200719:0060FALSEFALSE 6/22/200720:0060FALSEFALSE 6/22/200721:0060FALSEFALSE 6/22/200722:0060FALSEFALSE 6/22/200723:001 FALSETRUE
Based on the example data my goal is to move the data in a new worksheet that would look something like this
Date Start End Duration 6/22/2007 15:28 16:00 32 6/22/2007 18:02 23:01 299
When inserting a hyperlink in an Excel cell, the default pathname for the new link is always the current pathname of the workbook. After navigating to a distant pathname and inserting a hyperlink, inserting the next hyperlink in the next cell starts all over again at the current path.
Is there a method of telling Excel to start looking in z:\ABC instead of the current path? This would eliminate navigating through the entire path for each link.
A macro that handles the hyperlink and puts up a navigation window or something like that would be ok.
This macro adds a comment to a cell and some text from an input box. I store the last value entered in the input box via the registry, it is recalled as the default input box value. How do I capture the cancel property (Boolean, true or false?) so the ActiveCell.Value remains and comment is not added? When a user selects Cancel/X the macro deletes the value in the cell and add's a comment. This overwrites existing data with "" (nothing).
Can I use dates as argument in Boolean arithmetic? I have a list of name with their date of birth and I would like to tell who is between 18 and 25. It's easy enough with number but with dates? Excel 2007
I have a function that works well for checking if a specified file exist within a specified path. I realized I do not know how to just check if the folder exist!
Example: I want to see if the following folder exist with boolean response...
We currently use Excel to make reports of data obtained in field surveys. General data is repetitive throughout report. We have a title page, general particulars (GP) page, table of contents then data table pages. Each data page has info from general particulars page. i.e project name, date, inspector etc. Right now some cells of data table pagess have formulars pointing to applicble cells on GP page.
Presently I am designing a userform to input title and GP page data. So far OK.
Question: Can I take input on userform and add to footer. Info to be added after or inserted within text already there? i.e. Surveyors Name: ?(left footer) something center and something right. What type of code needs to be added and where do I place it .