vonguyenphu
New Member
- Joined
- May 26, 2019
- Messages
- 29
I need to put value of 2 cells saying cell 'A1" and 'A2' into window's clipboard to use for other purpose
Dim obj as DataObject
Obj.SetText range("A1")
Obj.PutInClipboard
Obj.SetText left(range("A2"),4)
Obj.PutInClipboard
When i run code (f5), then opened window's clipboard, it only saved the second (left(range("A2"),4)) and didn't include A1
However when i run via F8 in source code step by step, it saved both values.
Can anyone help me put two values into clipboard when running by F5?
Dim obj as DataObject
Obj.SetText range("A1")
Obj.PutInClipboard
Obj.SetText left(range("A2"),4)
Obj.PutInClipboard
When i run code (f5), then opened window's clipboard, it only saved the second (left(range("A2"),4)) and didn't include A1
However when i run via F8 in source code step by step, it saved both values.
Can anyone help me put two values into clipboard when running by F5?