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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,214,376
Messages
6,119,179
Members
448,871
Latest member
hengshankouniuniu

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