Thread: formula in code
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
geebee geebee is offline
external usenet poster
 
Posts: 190
Default formula in code

hi,

i have the following:

Dim CurrentReportMonth As Date
CurrentReportMonth = "=DATE(YEAR(NOW()),MONTH(NOW())-1+0,1)"

i am trying to figure out how i can make this work, like setting the
currentreportmonth in code, but i keep getting the error message. what am i
doing wrong?

thanks in advance,
geebee