excel - Pasting a control-c selection as links with VBA -


i'm trying paste user-copied selection (marching ants, not black-bordered) links, won't give me values. i've tried number of ways, example:

     this_ws.activate      this_ws.range("a1").select      activesheet.pastespecial link:=true 

it paste, , without error, invariably gives me values instead of links.

my ultimate goal convert user-provided selection regular range. research , experiments far imply way sanely (for values of "sane") paste links in temporary tab , harvest information necessary create equivalent range links. (other, more headache-inducing ways involve dataobject or monitoring sheet selection changes.)

update: according microsoft, "if source data isn't suitable linking or source application doesn't support linking, parameter ignored." why source data not "suitable"? it's macro-enabled workbook, left open , strings , ints in copied selection.

update2: clarify, looking duplicate (in vba) functionality gui when manual copy , click "paste link(s)" button in lower left corner of paste special dialog box. if can paste links on user-provided copy vba, know can rest. don't care if clipboard involved or not in process; want user able select, ctrl-c, alt-tab on tool workbook, hit button runs macro on range he/she specified.

its line

activesheet.pastespecial link:=true 

that causes problem. should be

activesheet.paste link:=true 

and yes, confusing, given paste link option accessed paste special dialog


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -