Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updated problem
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel cells randomly don't get updated unless each cell is updated | Excel Discussion (Misc queries) | |||
Subtotal fix for excel 2003 updated registry-now another problem | Excel Discussion (Misc queries) | |||
Forum is not updated! | Excel Discussion (Misc queries) | |||
updated row comes at the top | Excel Discussion (Misc queries) | |||
Link cannot be updated | Setting up and Configuration of Excel |