View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
BJ&theBear BJ&theBear is offline
external usenet poster
 
Posts: 27
Default Excel 2003 - using VBA to post to alternative worksheets

I have a complicated macro which posts a series of entries to a
worksheet called "expenses" but I am sending a copy of some sheets of
this workbook to all the staff for completion - but it does not
include the worksheet "expenses" but it does include a blank worksheet
called "expenses_new".

My question is can I adapt this macro so that if the worksheet
"expenses" exists then the macro will make all the entries in that
worksheet - but if it does not exist then all the entries will be
posted to "expenses_new".

Basically what I would like to do is find the VBA coding as follows:-

If worksheet "expenses" exists then

post all entries to "expenses"

ELSE post all entries to "expenses.new"

Will this work and how do I code it

Thanks

BJ?