Computer Games Forum
 

Go Back   Computer Games Forum > Tech > The Workshop > Limbaje de programare

Notices

Căutare produse PC Garage: Şterge căutarea

Reply
 
LinkBack Thread Tools
Old 17-09-2006, 23:53   #1 (permalink)
Registered User
 
Join Date: Feb 2004
Question VB in EXCEL

Salutari ,
Am o problema:
Am nevoie de un script fff urgent care sa imi copieze "comment"-ul unei celule intr-un camp alaturat.
Pe net am gasit urmatoarea functe:

Function GetCommentText(rCommentCell As Range)
Dim strGotIt As String
On Error Resume Next
strGotIt = WorksheetFunction.Clean _
(rCommentCell.Comment.Text)
GetCommentText = strGotIt
On Error GoTo 0
End Function



Problema e ca daca textul din comment e scrit pe mai multe randuri....fct nu pastreaza acelasi format, ci pune randurile unul dupa altul.....imi taie <cr><lf> de la sf fiecarei liniii....
HELP ....am mare nevoie de ajutor si e ffff urgent.
Va multumesc pt ajutor anticipat,
danny
danny[at]xnet[dot]ro
 
rodanny is offline    Reply With Quote
Old 18-09-2006, 00:00   #2 (permalink)
Registered User
 
ixtl's Avatar
 
Join Date: Dec 1999
Incearca din cod copierea celulei respective si Paste Special la celula dorita cu Comment.
Nu mai tin minte functiile, dar exista.

LE
Range("B3").Select
Selection.Copy
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteComments, Operation:=xlNone, SkipBlanks:=False, Transpose:=False


Unde inclocuiesti Range("B3") si Range("B5") cu ce ai nevoie.
Merge si pe randuri/coloane multiple etc.
Mi-a luat 30 sec. sa fac macro-ul.
Se mai poate si altfel, da' n-am timp :P

Be creative
__________________
...one of the truly bad effects of religion is that it teaches us that it is a virtue to be satisfied with not understanding.
 
ixtl is offline    Reply With Quote
Old 18-09-2006, 00:44   #3 (permalink)
Registered User
 
Join Date: Feb 2004
Unhappy salut

Man, imi cer scuze..eu habar nu am de vb...please...il poti transforma intr-o functie....sau cum sa il folosesc?
Danny
 
rodanny is offline    Reply With Quote
Old 20-09-2006, 17:25   #4 (permalink)
Registered User
 
bursuloi's Avatar
 
Join Date: Oct 2003
Function GetCommentText(rCommentCell As Range)
Dim strGotIt As String
On Error Resume Next
strGotIt = (rCommentCell.Comment.Text)
GetCommentText = strGotIt
On Error GoTo 0
End Function
 
bursuloi is offline    Reply With Quote
Old 20-09-2006, 22:16   #5 (permalink)
Registered User
 
Join Date: Feb 2004
am rezolvat..

Va multumesc tuturor....
 
rodanny is offline    Reply With Quote
Advertisment
Reply

  Computer Games Forum > Tech > The Workshop > Limbaje de programare

Thread Tools

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +2. The time now is 19:52.


Advertisement System V2.5 By   Branden
This site is copyrighted ©1997 - 2008, Computer Games Online SRL