I have this data from a sheet in date format in cell "A1". i retrieve the value of the date in a textbox. TextBox1.Value = Range("A1").Value then i wanted to change the date by hitting th edit button
private sub CommandButton1_Click()
DTPicker.Value = Range("A1").Value
End Sub
after changes have made, button save is clicked and at the same time the value from DTPicker is send to cell "A1", the value is retrieve back into TextBox1
private sub CommandButton2_Click()
Range("A1").Value = DTPicker.Value
TextBox1.Value = Range("A1").Value
End Sub
don't know what happen suddenly the value inside the cell become 12:00:00 AM, while the actual value that were supposed to be in that cell and textbox is 12/1/1999 - which is 12th of january 2001
If I am using the "filter" function in Excel and some of the values in my list change such that the filtering criteria requires certain rows to be add/removed. Is there a way to have this filter automatically update as opposed to hitting the "reapply" button each time?
I'm trying to change a cell in a 2007 workbook but I'm getting this message:
"the cell or chart that you are trying to change is protected and therefore read only. To modify a protected cell or chart first remove the protection using the unprotect sheet command (review tab, changes group) you may be prompted for a password."
However, the unprotect button on the changes group tab is greyed out (the protect button is available though). The workbook isn't password protected and I'm not being asked for a password. What am I missing?
How to edit a formula in a cell using vba code. For example, the cell A1 in sheet "sheet1" contains formula "=sum(Sheet2!B1+Sheet3!B1)" and I would like to use VBA to edit/change it to "=sum(Sheet2!B1+Sheet3!B1+Sheet4!B1+Sheet5!B1)" and so on
I need to detect when changes are made to a TextBox (Manual changes). In VB 'TextChanged' fulfills that function but there is no equivalent in VBA.
I also need to differentiate between adding a value to a TextBox which has a vbnull value (Does not need to trigger event) and editing or replacing the current TextBox value (Trigger an event).
Is it possible to update external links on a worksheet via running a macro? I have a worksheet where some cells have external links to other files, and every month I have to scroll through and do the typing in order to have everything up and running. A typical cell has formulas like =[E:ReportsAug-2007.xls]Data!F25 Another cell =[E:ReportsAug-2007.xls]Data!F43 and so on.
Every new month I actually have to replace all [E:ReportsAug-2007.xls] occurrences with for example [E:ReportsSep-2007.xls]. So, is it possible to have a macro which opens a textbox of which i can type the new month 'Sep', so that when the macro runs I save all the typing?
I have a togglebutton for an excel sheet in use for scoring psychological tests. When pressed, the button higlights the cells where a raw score is inserted.
What I need is a code to higlight the togglebutton when pressed, eg. green (colorindex 4). The button is white. How to do this?
Below is the code, It has more lines than needed, but it works.
Private Sub ToggleButton1_Click() 'FKV TOGGLE'
ActiveSheet.Unprotect "manisk" If ToggleButton1 Then
I use excel to read in an ASCII data file in which every line beginning with H is a header line and lines beginning with S are data line.
I want excel to filter out the header lines and output the file with the data lines only then outputs these in a new file.
I also want it to read the values from column 72 to 75 and subtract 6 from them then output them again to the same new file.
Sub read() Open "d:/intouch/0502SPSS.LOG" For Input As #1 Dim i As Integer Dim lines(9999) As String i = 0 Do While Not EOF(1) Line Input #1, z i = i + 1 If Mid(z, 1, 1) = "H" Then i = i - 1
I have a spreadsheet that is very large and formated a certain way. I want to make sure that a user cant put the cursor in the lower left corner and copy cells by dragging, copy & paste, or do anything other than input data and be able to highleght text and reinput data in case they mistyped or misspelled the data.
ex: user clicks on cell E33 and types in '1234568' and then move to next cell. The user can click back on E33 and can correct by retyping. That is all the user is allowed. The cells in question are also in ranges if this helps. EX: 'E33:AJ67'
I have a database in Excel 2013 and now I want that when a value (a person's name) is entered in a cell. That then the database sort of filters the list for me, so it's still possible to make changes in the entries.
[URL]
Picture above to specify the search, which I would therefore like to edit
Dashboard_Action Pool Team 7.2.xlsm
I have been all morning working on a simplified version of the tutorial from YouTube: Create your own Excel Search Pt. 4. But came back later so only then that I can not change the data:?
So that it searches for any date and replaces with the new ones, but obviously the use of quotation marks with the wildcards makes this difficult in VBA.
How to link the cell values in with the "Replace with".
Code:
Sub findrep() Dim target, cell As Range Dim i As String Dim k As String i = "Input_Sheet!$A$2:$A$1000>=DATEVALUE("??/??/????")"
I'm building a model that based on the start date (cell C7) needs to display the month of the project (M1, M2, M3, M4, ... M12) under the appropriate calendar month (Dec-07, Jan-08, etc.). The formula below works great (E4 is the calendar month Dec-07 in this case, and when I drag the formula horizontally it updates (F4, G4, etc.). B33 through B44 are my month references M1, M2, M3, etc.)
Here's the problem: The below statement contains seven nested ifs and Excel won't let me add additional if statements. How else can this be accomplished?
I found some VBA code here which I very slightly modified that I'm using to bring pictures over top of cells based on their values. The code works great but I can't get it to automatically update the pictures. To get the picture in each cell I have to hit F2+Enter. I've made sure that my calculations are on automatic.
I have tried the text-to-column trick as well as the find-replace = with = trick and neither of them worked. I'm guessing I need to call a function here to force each cell to recalculate in the same way F2+Enter works but I'm not how to do that or where to put it. I tried Application.Volatile True and that didn't work either.
For year 2007,2008,2012 and 2013, we have negative cash.
I want to compute for the investment cost, which I define to be the total accumulated cost before first positive cash. First positive cash occurs at 2009, so I want to sum 2007 and 2008, However, 2012 and 2013 also reports negative cash, so in the SUM formula, their values will be included.
How should I write the formula in order to sum all the negative cash before positive cash, disregarding all the other cash flows thereafter (be it positive or negative)?
I want to amend the ' Date Modified' for a spreadsheet. I have just made changes to it - so the 'Date Modified' shows today's date and time. Is there a way of changing the 'Date Modified' so it shows as yesterday's date?
I have a problem here regarding the combo box. The whole Column A has combobox. It would be easier if by just hitting the TAB or Enter it would go to the next cell just like what is usual in excel.
TAB = next cell to the right Enter = Next cell below
I have a table of data (total 142 rows). Column contains dates, in the format dd-mmm-yyyy.
I tried to filter using DATE FILTERS->EQUALS and in the custom filter window, I chose EQUALS then picked a date from the date picker icon. The date I picked was 5/4/2009 (this is May 4, 2009, formatted automaticall by excel as m/d/yyyy).
When I clicked OK, nothing showed up despite the fact that there are 6 occurences of May 4, 2009 (formatted as dd-mmm-yyyy in the data table)
So my questions are:
1. Is this due to the formatting?
2. Is there a way to change the date format supplied by the date picker?
1) I need to add an edit check 2) have a copy of Active Workbook Path stamped onto spreadsheet with date and time to create a visual record of where the file has been saved (described after the code below).
1) I need to verify that two cells (S7 and S9) are not blank before running my code below (=IF(OR(S7<>"",S9<>""),RUN CODE,"You must select your Provider or Division before you can save this document")).
- If both of these cells are blank a message box should notify the user that they must select the provider and/or division before they can continue with the save.
- If one or more of these cells are not blank the code below should run.
how can I change the button/shape name of a Form Button in Excel 2003? I assigned a name using the NameBox, however if I try to change the name via the NameBox, it does and work and the old name remains.
Is there a way to change the text on a toggle button in the code below? Basically I would like for the toggle button to begin with the word "START" on it and then when clicked changed to the word "STOP". Of course then when the user clicks on "STOP" it changes back to "START".
a button to run a macro but i don't like the standard plain grey buttons that excel offers. i saw a friend using one in his project but don't want to ask him how he did it as it would be considered copying. i will add an image to explain my specifications. there must be an easier way than having to design it and you vba to code the colour change.
I have several buttons which, when clicked, pull up a range of data from another tab. Each button repopulates the appropriate cells with its specific data. I need to have an identification of which data set I'm currently viewing so was considering having the button, when clicked, change color or background/lettering colors swap, etc, until another button is clicked, then it changes color and the original button returns to the standard format. Is this possible? What type of button do I need to use?
How do you references the properties of a shape? I am having trouble with 2 different types. Firstly, I have a worksheet with a group of commandbuttons (all added using the Control toolbox) and I want to loop through them changing, for example, the enabled property of each to TRUE.
Secondly, I have some commandbuttons on a worksheet (added using the Forms toolbox). How would I loop through changing, say, the text on the buttons. I used the macro recorder to try to get an idea and got the following:
Sheet1.Shapes("button 15").Select Selection.Characters.Text = "New Text"
Although this works, it is not very elegant, how can it be achieved without selecting the button each time, but rather by directly accessing the property.
Sub uncheck_all() Dim sh As Shape Application.ScreenUpdating = False For Each sh In ActiveSheet.Shapes
[Code]....
Currently, the button just unchecks a bunch of checkmarks. I want to modify the code so it also makes the value in cell C13 change to -9999, C14 to 9999, C16 to -9999 and C17 to 9999.
I am trying to assign a macro to the Print button on the Standard Toolbar. Basically I want that button to print the number of pages I've specified in a cell, but I still want to be able to use the 'File/Print...' option if I need to.
I did try to solve this issue in an earlier post, but this exact problem remained unsolved. For more information
My code works well if the worksheet name is Sheet1. It will change constantly. I have alot of other similar workbooks that are not affected and cannot figure this out. Here is the code that I get the error at: ....