Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Updated problem

Some great replies before, but i need a bit more help.

Here's my code:
Windows("Deviation.xls").Activate
Range("C1").Activate
Selection.Copy
Windows("EVALUATION.xls").Activate
Application.CutCopyMode = False
Range("M9").AddComment
Range("M9").Comment.Visible = False
Range("M9").Comment.Text Text:="Alex:" & Chr(10) & ""

How do i copy text from one cell in the deviation.xls file and paste it
as a comment in the evaluation.xls file?


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Updated problem

Hi
try something like the following:
sub foo()
dim wbk_source as workbook
dim wbk_target as workbook
dim wks_source as worksheet
dim wks_target as worksheet

set wbk_source = workbooks("Deviation.xls")
set wks_source = wbk_source.worksheets("Sheet1")
set wbk_target = workbooks("EVALUATION.xls")
set wks_target = wbk_target.worksheets("Sheet1")

with wks_target.range("M9")
.AddComment
.Comment.Visible = False
Comment.Text Text:="Alex:" & Chr(10) & _
wks_source.range("A1").value
end with
end sub


--
Regards
Frank Kabel
Frankfurt, Germany


Some great replies before, but i need a bit more help.

Here's my code:
Windows("Deviation.xls").Activate
Range("C1").Activate
Selection.Copy
Windows("EVALUATION.xls").Activate
Application.CutCopyMode = False
Range("M9").AddComment
Range("M9").Comment.Visible = False
Range("M9").Comment.Text Text:="Alex:" & Chr(10) & ""

How do i copy text from one cell in the deviation.xls file and paste
it as a comment in the evaluation.xls file?


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Updated problem

Running into error with the:
.AddComment lin

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Updated problem

Hi
in this case you already have a comment in cell M9. Try the following
change:
.....
with wks_target.range("M9")
on error resume next
.AddComment
on error goto 0
.Comment.Visible = False
Comment.Text Text:="Alex:" & Chr(10) & _
wks_source.range("A1").value
end with
end sub


--
Regards
Frank Kabel
Frankfurt, Germany


Running into error with the:
AddComment line


---
Message posted from http://www.ExcelForum.com/


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel cells randomly don't get updated unless each cell is updated Lost in Excel Excel Discussion (Misc queries) 5 September 29th 08 06:56 PM
Subtotal fix for excel 2003 updated registry-now another problem Laura Excel Discussion (Misc queries) 0 October 17th 07 06:49 PM
Forum is not updated! Eric Excel Discussion (Misc queries) 2 June 7th 07 09:34 AM
updated row comes at the top Fam via OfficeKB.com Excel Discussion (Misc queries) 2 April 11th 06 05:20 AM
Link cannot be updated LarryP Setting up and Configuration of Excel 1 December 6th 05 10:55 PM


All times are GMT +1. The time now is 08:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"