PC Review


Reply
Thread Tools Rate Thread

add comment in the loop

 
 
Souris
Guest
Posts: n/a
 
      22nd Feb 2008
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,

 
Reply With Quote
 
 
 
 
Kalpesh
Guest
Posts: n/a
 
      23rd Feb 2008
Hi,

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

Does that work?

Kalpesh
 
Reply With Quote
 
Souris
Guest
Posts: n/a
 
      25th Feb 2008
I had to add wait to fill the spreadsheet.
I tried to use screen updating, but it is the same,

Thanks again for helping,

"Kalpesh" wrote:

> Hi,
>
> How about adding Application.ScreenUpdating = false before the loop.
> And, set it to true once the loop is over.
>
> Does that work?
>
> Kalpesh
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Excel comment on mouseover but not the comment indicator jrfauteux@gmail.com Microsoft Excel Programming 5 29th Sep 2010 11:59 PM
Edit Comment erases part of screen; comment uneditable Charles Blaquière Microsoft Excel Discussion 0 10th Sep 2008 08:31 PM
Mouse-over on comment highlights barely shows comment text GordonM Microsoft Word Document Management 0 9th Apr 2008 01:13 AM
Comment features - changing the colour of comment ballons =?Utf-8?B?TG9vcHN0ZXI=?= Microsoft Word Document Management 1 10th Jun 2007 10:19 PM
a comment plugin & copy paste directly from excel to comment ? fr. =?Utf-8?B?UkZN?= Microsoft Excel Worksheet Functions 0 1st Dec 2004 11:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:37 PM.