Well, I *think* I've fixed it by replacing the line:
destrange.Value = SourceRange.Value
with:
SourceRange.Copy
destrange.PasteSpecial
It seems to be pasting the larger cells now. Weird.
But why do I only get an error with cells containing too many characters? The other times I run the macro, the SourceRange would seem to be multi-cell (again, I did not write this original code), and everything runs fine.
I didn't know the error line number before, but I just turned off my error handling and tried it again. The line number is Line 103: "destrange.Value = SourceRange.Value
I'm sorry, I completely forgot to list the error. It's 1004 - Application-defined or Object-defined error. Usually I only get that when I'm trying to access "Row 0" or something.
The macro stops halfway through, where it's already added the new worksheet to my current workbook, named it, and...
I need to include a macro in my spreadsheet that will take a directory of files and combine them into a single specific sheet in my spreadsheet. I found code here(http://www.rondebruin.nl/fso.htm) that I could tweak for my specific purposes, and it works in most cases. After a few test runs...
I'm working with the Worksheet_Change event for the first time. It works fine when individual cells are changed, recalculating all my relevant columns. Unfortunately, copy/pasting or deleting entire rows of cells will call the subroutine so many times that everything slows down to a crawl. I...
Thank you for your replies. Unfortunately, that gives me the same error beep and disabled Undo, PH. (Also, it updates the column even when all the user has done is click on a cell). Even changing it from SelectionChange to Change didn't fix it, though. Any other ideas in your hat?
I’m trying to add a “Last Time Updated” column to my spreadsheet of product information. I got it to work (it updates Cell BQ every time any cell in that row is changed), but it has “broken” the Undo function in Excel. I just get an error beep and nothing is undone. If I can’t fix that, I’ll...
Hey, I think I've come up with something that works. I'll post the code below in case someone stumbles upon this later. Thank you for trying to help me, though. I appreciate your time.
Private Sub UserForm_Initialize()
ActiveWorkbook.Sheets("Sheet1").Activate
'Look for the first...
Are you using ComboBox and DropDown interchangeably or do they mean something different?"
I just meant that a dropdown is part of a ComboBox. When you first see the ComboBox, there is nothing in the field, but you can see the limited choices available once you click on it.
"Why 15...
Let's say the spreadsheet has 6 products, and their color column looks like this -
Color:
Spruce
Moondust
Starry Night
Spruce
Pink
Starry Night
My form would have 15 or so comboboxes, empty as a default, with the list of Color Family choices waiting in the dropdowns. I would fill in the...
Now you are saying that the user does not do this. Only TWO people do this. But they are doing the selection of a Color based on WHAT? "
My original question was referring to our 2 employees when it said "users". Suppliers as "users" didn't seem important at the time; I'm sorry if it was...
That is how I originally programmed it, but the Boss would like the Color Family to be determined only by two approved employees, for consistency. One man's Light Brown is another man's Medium Brown, and all that. The suppliers will use the main data entry form and send it to us. Our two...
Oh, *believe me*, you are preaching to the choir. I cannot tell you how many times I have made this argument to TPTB. I am but a lowly intern, assigned to do data entry. It was my idea to have a data entry form at all, because I refused to waste so much time and effort doing things the old...
Oh, no, I misunderstood you. I had made a ComboBox on a userform like the other form I have for this spreadsheet.
I'm afraid that if I add something to the sheet itself, it will complicate things. I'm going to have a dozen or so people using this data entry form for many different product...
I really appreciate you walking me through this. I'm getting a syntax error on the line that begins "topleftcellvalue".
Do I replace "Color_Family" with the column letter of my Color_Family column (which is V)? Or do I make a second sheet in the workbook with all the Color_Family choices...
I'm sorry, I don't quite follow. Where should I put the code you gave? I tried it in "updateSpreadsheet", but I get a runtime error 1004: Method 'Range' of object '_Global' failed.
I'm trying to do as much as possible with VBA because a lot of different users will be using this with a lot of...
I have a spreadsheet of product info including two columns – “Color” and “Color Family.” The Color column is for specific (sometimes odd) color names like “Starry Night.” The Color Family column is supposed to clarify that the Color actually is for search purposes (e.g. “Silver”).
I’m trying...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.