LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default VBA to Fix Dates

Nevermind. Selection.NumberFormat = "m\/d\/yyyy" fixes it.

undrline wrote:
Here is my attempt at using SendKeys:

Selection.NumberFormat = "m/d/yyyy"
SendKeys "%o", True ' Format
SendKeys "e", True ' Cells...
' Here's where it gets stuck:
' First, have to hope that the "Numbers" tab is the one showing
' Second, it stops with the dialog open, doesn't tab to the selected entry.
' And, if I try to complete the operation manually, it continues, tab and all,
after I select OK to the dialog.
SendKeys "{TAB}", True
SendKeys "c", True ' date format from previous line; only one C needs to
be pressed
SendKeys "{TAB}", True
SendKeys "m/d/yyyy", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{ENTER}", True

I found the problem. Help me fix it, please . . .

[quoted text clipped - 17 lines]

Matt


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200705/1

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking computer dates (time) to spreadsheet dates that have formu bigisle Excel Worksheet Functions 3 January 3rd 10 08:05 PM
Toggle a range of Julian dates to Gregorian Dates and Back PSKelligan Excel Programming 4 May 8th 07 05:51 AM
Identifying unique dates within a range of cells containing dates cdavidson Excel Discussion (Misc queries) 0 October 12th 06 08:19 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
Charting data against dates where dates are not at fixed intervals PK Charts and Charting in Excel 4 June 16th 05 05:08 AM


All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"