VBA Not Accepting Changes?

May 3, 2014

I have a button on a userform that will generate certain text in a combo box. The combobox then goes to a worksheet. If I select a second button, I want the first information on the worksheet to clear and accept the new information from the next button.

NOTE: I have it as a combobox so I can either select it from the combobox or click the button. When I select the information from the combobox, it does clear out everything automatically.

Here is my code:

Private Sub CommandButton2_Click()
Worksheets("score").Range("B6").ClearContents
ComboBox1.Text = ComboBox1.Text + "PASS"
Worksheets("score").Range("b6") = Me.ComboBox1.Value
TextBox2.SetFocus
End Sub

What I think I am doing is clearing the cell, entering my text then going to the next text box, but when I click the second button (same code, text is "FAIL"), I then get "PASSFAIL" in cell B6.

I want it to clear out the previous entry and only use the new one, but it keeps all that I click even though I said to clear the contents.

View 3 Replies


ADVERTISEMENT

Textbox Not Accepting Given Values

Oct 25, 2009

The Code will not add the found values into the userform textboxe's.

View 14 Replies View Related

Formulas Not Counting Before Re-accepting?

Jan 18, 2013

I have an xls-workbook that is saved in OpenOffice. It has simple formulas that shows correctly in Excel. Excel doesn't solve them before "re-accepting" (like going to formula bar and pressing enter). No editing of formula is needed at all (unless you count "enabling edit-mode" and accepting the empty edit as editing).

View 2 Replies View Related

Excel Not Accepting Object & Its DataType

Aug 13, 2007

Leith Ross kindly helped me with the below macro but for some odd reason, Excel simply does'nt like it and gives me the error message: "Compile Error: Object Required".

The code below is part of a bigger macro.

View 9 Replies View Related

Conditional Formatting - Accepting But Not Working?

Jul 5, 2012

I have a spreadsheet that has values in the end column that read Addition, Deletion or No Change. I am trying to get the row cells in Column A to shade red, green or yellow depending on the value of the cells in Column I. I have tried the folllowing:

="IF(I4=No Change)"

I chose the fill to be green for this but when I click OK nothing happens but I do not get any error messages.

View 2 Replies View Related

Worksheet Not Accepting Printing Defaults

Aug 22, 2006

I've created a worksheet that uses multiple print macros with defined margins. This works fine with the Epson printers I have, but a user has an HP Officejet Pro K550.

This printer has an option named "Minimize Margins". If this option is checked then you adjust the margins the way you want.

For some reason when this particular workbook is opened you have to manually go and check this option so that the margins can be manipulated. this is a problem b/c my macro prints several reports so it's impossible to set this option.

I then opened a different workbook and it accepted the default setting (option checked). For some reason the workbook I created doesn't.

View 3 Replies View Related

Code Is Not Accepting Beginning Of String Values (WORDS)

Jul 14, 2014

This code is not accepting the values which is starting from strings like this

for example

bearing 15/16 IN LG, 1-1/16 IN OD, 11/32 IN THK,21/128 IN ID
19/128 IN LG, 2-3/64 IN OD, 1/2 IN THK, 5/64 IN ID
steel 15/16 IN LG, 1-1/16 IN OD, 11/32 IN THK,21/128 IN ID
19/128 IN LG, 2-3/64 IN OD, 1/2 IN THK, 5/64 IN ID
spares 15/16 IN LG, 1-1/16 IN OD, 11/32 IN THK,21/128 IN ID

[Code] .....

View 1 Replies View Related

Multiple Barcode Scanners: Prevent The Scan From Accepting Data Until The Macro Has Completed Its Cycle

Jan 26, 2007

I use a scanner that initiates a f2 command and trips my macro. I would like to use multiple scanners using a 8 port hub but I am having trouble with a scanner starting my macro and another scanner dumping data into my macro before the first one is finished. This is dropping scanned data into my macros. Is there a way to prevent the scan from accepting data until the macro has completed its cycle.

View 2 Replies View Related







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