Formatting a Calendar Entry using Forms VBA

nkw2306

New Member
Joined
Jan 20, 2015
Messages
32
Office Version
  1. 2019
Platform
  1. Windows
Hi. :)

The date the Monthview brings back onto my sheet is not recognised as a date. So when I try to look up the date to name the tab it isn't recognised. I have tried the following

Selection.NumberFormat = "DD/MM/YYYY"

And

Application.SendKeys "{F2}", True
Application.SendKeys "{ENTER}", True



Cells(emptyRow, 8).Value = TextBox6.Value is where it's bringing back the date but it's in text format or something. So I tried to format this to no avail.

Please someone help?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hello,

Your TextBox is holding ... well Text ...

In order to get a Value ...

You should test CDate(TextBox6.Value)

Hope this will help
 
Upvote 0
If I said I was blonde would this explain it!! Lol Thank you. I'll give it a go!
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,240
Members
448,555
Latest member
RobertJones1986

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