Command Button press to put data in UserForm to specific cell

andycrowh

New Member
Joined
Aug 28, 2022
Messages
3
Platform
  1. Windows
Hi there,

I have a VBA Userform, when the command button is pressed the data inserted into the UserForm needs to be placed in specific cells within the workbook.

Sheet name - Sheet3 (Template)

Textbox1 to B5 and C59
Textbox2 to D59
Textbox3 to C62
Textbox4 to D62
Textbox5 to D7
Textbox6 to F7

I have a column (B) where it will insert the value from D7 as a date and the column to the left (A) shows the day, if the cell in column B is empty I want column A to not show anything
 

Attachments

  • 2022-08-29 11_46_19-TIMESHEET TEMPLATE - Excel.png
    2022-08-29 11_46_19-TIMESHEET TEMPLATE - Excel.png
    4.1 KB · Views: 22

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Range("B5") = Me.Textbox1
Range("C59")= Me.Textbox1
etc.

In Column A =if(A2="", "", B2) and format as appropriately using Custom Format
 
Upvote 0
Thanks Alan, so the formula already is =TEXT(B9,"dddd") what would I type to say if B9 is blank then show nothing?
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,941
Members
452,539
Latest member
delvey

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