Need help with userform data transfer

MrHahn

New Member
Joined
Mar 13, 2014
Messages
1
Hey guys, first and foremost. ALL YOU GUYS ARE AMAZING! I've learned so much from this site (more or less VBA newb) and I just have to say, I am thoroughly impressed with how helpful everybody is on here. Really really awesome! Ok, time for my issue! I am improving a quote spreadsheet I made for work and am implementing a userform. I'm having a small issue with transferring the data, everything is setup correctly and the data does get transferred. However, in cells that are formatted for accounting, the userform is submitting blank data which is getting rid of the "$" in the cell and just leaving it completely blank. Not really a big deal, but just the visuals of seeing blank cells where a blank cell with a "$" on the left side of it should be it driving me nuts lol.

Ok so this is what I have:

With Sheets("QUOTE")
.Range("C1").Value = BOATPRICE.Value
End With

And that's how it is for every piece of data that needs to be on the sheet.
I've figured out how to make the form do what I want it to do (if its the easiest/right way I don't know).
But I could set it up like this and make it do what I want:

If PRICE.Value = True Then
.Range("m1").Value = PRICE.Value
Else
.Range("m1").Value = "0"
End If

I do know that the latter one works, however, I have 29 inputs that are set up to have the "$" in them regardless of if they get used or not and I'd rather not do that for all 29 accounting cells/inputs lol. I'm sure I'm doing this in the most complicated way but it's how I'm picking up this VBA stuff I guess lol.

Thanks in advance for the help!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You can set the number format of the cell as you update the value.
e.g.,
Code:
With Sheets("QUOTE").Range("M1")
  .Value=PRICE.Value
  .NumberFormat = "$#.##"
End With
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top