Worksheet Question

  • Thread starter Thread starter Greg B
  • Start date Start date
G

Greg B

I have a workbook that is volitile and I would like for a macro to look up
value j13 and copy each one onto a worksheet. I need it to be volitle so I
dont need to change it each time a new person is put on the database.

Any ideas would be great

Thanks

Greg
 
How many worksheets do you have and where do you want to copy it?
 
Thats the thing I have not a limit of worksheets. Here is the idea I have.

The two cells i need from all sheets are

"b3" and "j15"

the thing is when I have a new person I have an automatic page setup where I
get their details and a new worksheet is added. I just want to collect this
information from these sheets and place them on a worksheet called "details"

Hope this is a little bit more helpful

Thanks
Greg
 
Greg,

There are a number of difficulties here.

The obvious thing is to trap the NewSheet event and code into there, but the
two cells will not be populated by then.

Then there is the possibility that you will rename the default name
allocated to the sheet.

Does the details sheet have to know the source of the data?

Could the code prompt and load those two values?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I never thought of That I have code to add the sheet I could just extend it
a little bit more. Thanks for that
Just was too blind to see it that way.
\
Thanks
Greg
 
Dim rw as Long, sStr as String
Dim sh as Worksheet
Worksheets("Details").Cells.ClearContents
rw = 1
for each sh in Worksheets
sStr = lcase(sh.Name)
if sStr <> "details" and sStr <> "setup" then
rw = rw + 1
With Worksheets("Details")
.cells(rw,1).Value = sh.Range("B3")
.Cells(rw,2).Value = sh.Range("J15")
End with
end if
Next
 
Thankyou Tom much easier than me trying to get it running. Works Great I was
definately going in the wrong direction

Thankyou Again

Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top