View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
BMeredith BMeredith is offline
external usenet poster
 
Posts: 3
Default Auto date in VBA

My appologies, I'm sure you all would know this, but I am getting a Sub or
function not defined error.

BMeredith wrote:
First off, I appologize if this had been posted before. I have been looking
for a while now and cannot find the exact answer I need. I know it is going
to be very basic, yet have no luck doing it on my own. Thank you in advace
to all of you who may help me. Anyways, I am trying to write simple code to
update a cell value with the Text "Week of" and then calculate the first day
of the previous work week (Sunday) in mm/dd format. If this is not possible,
I am fine with the Today -7 function, but cannot get that to work. Here is
the code I have been working with and get an error on the Text portion alone.

Range("c2,c13,k13").Value = "Week of" & (Text(Today - 7, "mm/dd"))

Again, thank you to all who helps me with this.

Brandon