Paste a value (SUM)
In your code somewhere have you turned off automatic calculation? If so you
will need to turn it back on at the end of your sub. I tried doing this and
it worked fine. The calculation was: "B2=SUM(A1:A2)" Cell B2 was not
updated until after automatic calculation was turned on.
Application.Calculation = xlCalculationManual
Range("A1") = ClipboardGetText
Application.Calculation = xlCalculationAutomatic
Public Function ClipboardGetText() As String
' (works the same as VB6 Clipboard.GetText function)
Dim objDataObject As New DataObject
objDataObject.GetFromClipboard
ClipboardGetText = objDataObject.GetText(1)
End Function
" wrote:
Hi!
In the clipboard I have a number (e.g. 123,40) which I want insert via
a VBA-Macro into a special cell. In an other cell there is a
SUM-Function which includes also the one where the value was
automatically pasted in.
Now there is the problem that after pasting the value it doesn't appear
in the sum unless I made a double click on the cell.
Does anybody have a hint?
Best Regards,
Nachtigall
|