add comment in the loop

S

Souris

I have following code to add comment to my cells from MS Acess tbale

ActiveSheet.Cells(i, j + 1).AddComment MyDatabase.Fields(j - 1).Value

It works and adds comment to my cell.

The problem is when it is in the loop which does not add second row of
comments.

Application.Wait (Now + TimeValue("0:00:03"))

I have to add the wait 3 seconds command in the loop and it adds second row
of comments.

Does it make sense that it needs 3 seconds to add one row of comments?
It will be too long if I have a couple lines.

Any ideas or work around for this?

Your information is great appreciated,
 
K

Kalpesh

Hi,

How about adding Application.ScreenUpdating = false before the loop.
And, set it to true once the loop is over.

Does that work?

Kalpesh
 
S

Souris

I had to add wait to fill the spreadsheet.
I tried to use screen updating, but it is the same,

Thanks again for helping,
 

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

Top