Ask Your Question
0

VBA support - "selection.copy" not working in LO3.5

asked 2012-03-14 16:33:25 +0200

dwhiting gravatar image dwhiting
16 2 2

updated 2012-03-14 16:35:41 +0200

I've just upgraded to 3.5.0rc3 and find that one of my old VBA macros that used to work under version 3.4 has stopped working, it runs through all the code and does not throw any errors, but when stepping through it I can see that it does not execute the copy action on one line.

So when I later paste, blank cells are pasted instead of the data from C11:C16.

Does anyone know why this is?

example code below

Option VBASupport 1

Sub Copy_Paste()

Range("C11:C16").Select

Selection.Copy

Range("D1").Select

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True

End Sub

delete close flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2012-03-15 16:40:02 +0200

dwhiting gravatar image dwhiting
16 2 2

I found a work around for this. I didn't realise but you can call a BASIC sub routine from within the VBA code, so I simply recorded a new macro within Libre using dispatch code to do the copy and called this at the point in my VBA code where the selection.copy failed.

link delete flag offensive edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-03-14 16:33:25 +0200

Seen: 365 times

Last updated: Mar 15 '12