Re: Locking worksheet
Ok, I think I understand now. This will unprotect the sheet when A1 is changed, lock all cell in the entire worksheet, and reprotect the sheet.
Re: Locking worksheet
Ok, I think I understand now. This will unprotect the sheet when A1 is changed, lock all cell in the entire worksheet, and reprotect the sheet.
Re: Locking worksheet
It would be something similar to:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Me.Protect "Password"
End If
End Sub
in the worksheet module. Change the address to your cell address, but make sure to keep the $A$1 format because a simple A1 won't work. You have to keep the "$" signs.
Re: VBA CODE for Excel 2007 & 2010
forum.ozgrid.com/index.php?attachment/44959/
I think this has everything.
I assumed you meant a cancel button on the bottom of tab 2, just to close the userform?? If not, then that's not done yet :).
Re: VBA CODE for Excel 2007 & 2010
forum.ozgrid.com/index.php?attachment/44948/
Forgot to set the tab order on the Rent textbox. That would get annoying really fast, lol...at least to me.
All fixed now.
Re: VBA CODE for Excel 2007 & 2010
.................wait!!!......give me one minute to re-upload it......
Re: VBA CODE for Excel 2007 & 2010
forum.ozgrid.com/index.php?attachment/44947/
Try that. I didn't test the remove buttons, but they were working before...should still work. The comboboxes will already act like you want. If you start typing something that's on the list, it will predict and drill down what you're typing.
-Column Q is now a hard number for Rent.
-"Find" buttons added to go to the property you're looking for on either sheet. Seperate buttons...I know you only wanted sheet1, but that's ok. If you never use it, it doesn't hurt anything.
Re: Corresponding term to reflect in next cell
We have no way of supplying any solution other than a guess without sample data. Post an example workbook (or the real one if it's no secret) so we can see what you have.
Re: calendar controls in excel 2010 forms
Ok...I did
This isn't google, but no you can't. They removed the calendar control in XL14, but they added a Date/Time Picker. It should be in "additional tools" in your toolbox. Look for DTPicker
Re: VBA CODE for Excel 2007 & 2010
forum.ozgrid.com/index.php?attachment/44938/
Ok, give this a shot.
I added a couple more things...one you'll probably notice, the other maybe not...
-There is now a checkbox to choose if you want to unload the toolbox every time you do something with it.
-You can click around on your workbook with the toolbox in front of it now. (before you had to close the toolbox to navigate through the workbook)
Check it out. Let me know how the testing goes. Good luck
Re: VBA CODE for Excel 2007 & 2010
Not a problem. Will wait for the next update. So you want a dropdown, similar to the one to delete items off of sheet2, but to delete single items off of sheet 1? Right now the clear button clears the whole sheet. Do you want that removed or left as an option?
EDIT: got the update, but still need to know how you want to handle things per questions above.
Re: VBA CODE for Excel 2007 & 2010
I'll post up a little rant about coding too.
Few good habits to get into.
-Always declare all of your variables. You can force this by typing "Option Explicit" at the top of each module. If you Open the VBE, click the Tools menu, and click Options then check the box that says "Require Variable Declaration" it will do it automatically on any new modules you insert.
-Always rename any userform controls you'll be calling regularly in your code. "tbAddy" is easier to identify than "TextBox1".
-Get in the habit early on of indenting your code...it makes it MUCH easier to read and a missing "End If" or "End With" or similar will show itself pretty quickly. When you get started, you'll see what I mean.
-Use the recorder, but don't just blindly use code that was made by the recorder. If you get stuck on some syntax, record yourself doing what you're trying to code to get it, but just use the applicable line(s) out of the recorded code.
-If you see code like:
Sheets("Sheet1").Activate
Range("A1").Select
Selection.Copy
Sheets("Sheet2").Activate
Range("B4").Select
ActiveSheet.Paste
all that can be combined into this:
-It's rarely necessary to Select a range to work on it.
-It's rarely necessary to Activate a sheet to work on it.
-If screen "flicker" is slowing you down, you can stop it with this line:
and make it true at the end.
I guess that'll due for now, lol...can't give ya all the tricks. You'll figure it out as you go along. Good luck to you!!
Re: VBA CODE for Excel 2007 & 2010
Some of the column references were off. All fixed now, plus a button to clear sheet 1, as requested.
forum.ozgrid.com/index.php?attachment/44929/
Late night last night, guess I missed that messed up code.
When you get your splash screen done, post it up.
Re: VBA CODE for Excel 2007 & 2010
Let me check it out today and see what's going on with it, lol. I'll post it again later today.
Re: VBA CODE for Excel 2007 & 2010
forum.ozgrid.com/index.php?attachment/44925/
Ok, try this one
I had to clear sheet 2, but pushing the search button should put em all back
Not sure why the button wasn't there.
Re: VBA CODE for Excel 2007 & 2010
Not a ribbon tab. The sheet tab at the bottom...where you click to change from one sheet to another. Where the sheet name is.
Re: VBA CODE for Excel 2007 & 2010
Re-download the attachment in this post and the one called ".....sheet2" in my previous post. Open both and leave them open. Go to the "....sheet2" workbook and right click on the sheet tab and select move or copy...when the box pops up, find the dropdown list at the top that says "To Book" above it. Drop that list down and select the workbook called ".....UPDATED AGAIN5" and click OK. This should close the "...sheet2" workbook and the ".....UPDATED AGAIN5" workbook should have both sheets in it. The button will stay, the frozen panes will stay and the code will remain intact.
-MLS now allowed up to 9 digits.
Re: Tax help using vlookup and if function
It just depends on how it needs to work...maybe.
I thought it was a flat 20% for the first $20,000 and 30% for any amount over $20,000, hence my first solution.
Could you post your workbook?...and I'll see what I can do.
Re: Tax help using vlookup and if function
20% for first 20,000 and 30% for the balance can be done in one step, with this formula:
=IF(B2>=20000,(B2*0.2)+((B2-20000)*0.3),B2*0.2)
which gave $4076.50 for $20,153
Re: VBA CODE for Excel 2007 & 2010
Ok my friend, here's the latest...
-I took a few more liberties with the toolbox, lol. "Delete one entry on sheet 2"..."clear all entries on sheet 2". If you never use it, that's ok...but it's there.
-The date listed from the userform posts into column AT...MLS into column E.
-The last 3 entries on sheet1 need to be checked. It looks like they were added with the old code, with the old column references. Not sure, just check it out.
-I had to insert columns into sheet 2 so the sheets would match or the copy wouldn't work right.
-The entry boxes on the "add new" userform section now have a few parameters set. For instance, if you enter a 6 digit zip code, or an 8 digit MLS# by mistake, it will (should) kick it out. Non numeric price fields will kick out. State codes greater than 2 characters will kick out. If you want to be able to use 9 digit zip codes it can be changed to that...or to accept either. MLS#'s are always 7 digits right?
- "Days listed" in column.........well whatever column it is, lol....will update automatically daily based on the date in column AT.
I had to split it into 2 workbooks...it appears we've reached the limit of attachments on this site. Be sure to move sheet2 back into the "......UPDATED AGAIN5" workbook, not the other way around. The coding is NOT in the "........sheet2" workbook. Again, when you're done both sheets should be in the workbook called "....UPDATED AGAIN5".
I think that's it. See what ya think and if you need changes, let me know.
forum.ozgrid.com/index.php?attachment/44912/
Re: VBA CODE for Excel 2007 & 2010
No questions that I can think of. Next thing I need is the updated "Sheet1" with the new "date listed" column.