Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions


Fill in a brief DW Simpson Registration Form
to be contacted when new jobs meet your criteria.


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-29-2019, 01:18 PM
theBrownsAreComing's Avatar
theBrownsAreComing theBrownsAreComing is offline
Member
CAS
 
Join Date: Jun 2018
Posts: 90
Default VBA - paste links error

Is there anyway to write VBA that paste links from workbook A into workbook B without using ton's of .selects and .activates? Our template that uses this code fails 30% of the time and I think it's the selects and activates. Everything I google says 2 things …

1. .select and .activate makes VBA work way slower
2. you can't paste links without using .select because pastespecial sucks. Stuff like

Any VBA sages? It doesn't help that I only have like 1 month of VBA experience haha … but wiseowl is a G
__________________
GPODAWUND

P FM JOB IFM
Reply With Quote
  #2  
Old 03-29-2019, 01:54 PM
SlowMotionWalter's Avatar
SlowMotionWalter SlowMotionWalter is offline
Member
CAS
 
Join Date: Jun 2013
Posts: 13,204
Default

Quote:
Originally Posted by theBrownsAreComing View Post
Is there anyway to write VBA that paste links from workbook A into workbook B without using ton's of .selects and .activates? Our template that uses this code fails 30% of the time and I think it's the selects and activates. Everything I google says 2 things Ö

1. .select and .activate makes VBA work way slower
2. you can't paste links without using .select because pastespecial sucks. Stuff like

Any VBA sages? It doesn't help that I only have like 1 month of VBA experience haha Ö but wiseowl is a G
Something like this?
Code:
Workbook("Book1").Worksheets("Sheet1").Range("A2").Formula = "=" & Workbook("Book2").Worksheets("Sheet1").Range("A1").Address
__________________
Quote:
Originally Posted by bigb View Post
You should learn to communicate in a serious manner before you expect a serious answer.
Spoiler:
Quote:
Originally Posted by Kangaz wit Attitude View Post
Force of habit, 2pac's been typing "88" a LOT since Trump got elected.
Quote:
Originally Posted by JMO View Post
You ought to see the bush. It's impressive.
Quote:
Originally Posted by Pikachu
10:53 pm: some ppl dont take advices well
Quote:
Originally Posted by mayo fan
9:45 pm: ao fan would be hot covered in mayo!
Quote:
Originally Posted by Snikelfritz
if you'd like I can come visit and dress up like a girl and get in some fights
Quote:
Originally Posted by Kaner3339 View Post
i think everyone needs to do this type of thing to get a dose of reality and straighten people up. it's kinda like going to the mountains and becoming a monk except it's with hundreds of potatoes and a lot of stoners with tattoos in a kitchen
Reply With Quote
  #3  
Old 03-29-2019, 02:01 PM
act_123 act_123 is offline
Member
CAS
 
Join Date: Dec 2013
Posts: 4,405
Default

.address(false,false) if you don't want any $$. (false,true) and (true, false) will give you Column$Num and Num$Column references (I don't recall which does which but I think row comes first.
__________________
ACAS 7 8 9
Reply With Quote
  #4  
Old 03-29-2019, 03:59 PM
theBrownsAreComing's Avatar
theBrownsAreComing theBrownsAreComing is offline
Member
CAS
 
Join Date: Jun 2018
Posts: 90
Default

Quote:
Originally Posted by SlowMotionWalter View Post
Something like this?
Code:
Workbook("Book1").Worksheets("Sheet1").Range("A2").Formula = "=" & Workbook("Book2").Worksheets("Sheet1").Range("A1").Address
Ooooo I like that Iíll try it first thing Monday
__________________
GPODAWUND

P FM JOB IFM
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off


All times are GMT -4. The time now is 10:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.16597 seconds with 11 queries