LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pam Pam is offline
external usenet poster
 
Posts: 128
Default make cell active in beginning of macro

I am running the following code which works great for inserting a date into a
cell with a calendar, but it only works great if they are in the right active
cell when they click the macro. I need to reduce errors by making the active
cell b1 when they start the macro, do that it will check the date in that
cell, and return the date in that cell.
I'm lost., any help would be appreciated.
Thanks


Private Sub UserForm_Initialize()

If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Date

Range("B1").Value = Date

End If
End Sub
 
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
macro to find cell content in sheets and make sheet active Nigel Excel Discussion (Misc queries) 4 June 26th 14 02:38 PM
use current cell address as beginning of macro mohavv Excel Discussion (Misc queries) 2 April 18th 08 03:52 PM
Make the next cell active [email protected] Excel Programming 3 March 28th 06 06:56 PM
Make a Word event macro fire in active document [email protected] Excel Programming 2 March 27th 06 01:00 PM
Make a particular cell the active one Newbie Excel Programming 3 April 14th 04 04:52 PM


All times are GMT +1. The time now is 01:03 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"