473,320 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Links in excel and vb

Hi all,

Here's hoping you can help a very new person to VB.

I've got an Excel file with links to other Excel files in hundreds of cells, but there are two parts of these links in each cell I want to change automatically with this VB below

I used the following (the file replaces the first one correctly..but

Expand|Select|Wrap|Line Numbers
  1. Sheets("Dry Year Final Balance").Select
  2. Range("B1: AG110 ").Select
  3. Selection.Replace What:="date", Replacement:=baseyear,  LookAt:=xlPart, _
  4.     SearchOrder:=xlByRows, MatchCase:=False
  5. Sheets("Dry Year Final Balance").Select
  6. Range("B1: AG110 ").Select
  7. Selection.Replace What:="Dummy", Replacement:=NewRunNo,   LookAt:=xlPart, _
  8.     SearchOrder:=xlByRows, MatchCase:=False
Once it gets to the end of the first replace the links in Excel try to update automatically. This halts what is happening as it tries to find a file which doesn't exist. Is there a way I can stop this happening so the 2nd replace can take place before Excel updates the link?

I tried using UpdateLink:=0 after the 1st replace, but this didn't work or I placed it incorrectly

Apologies if this is very basic, but I am tres new to VB.

Look forward to your answers.

M
Aug 23 '07 #1
0 1010

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Michael Robbins | last post by:
Please pardon me if this question is common; I didn't see an answer. I have access to a MS Excel Add-In but I want to use the functions from within my Visual C++ code. Can I do this? How?
13
by: NoSpamThankYouMam | last post by:
I am looking for a product that I am not sure exists. I have bookmarks to webpages in Internet Explorer, Mozilla Firefox, Opera, Netscape Navigator, and on a "Favorite Links" page on my website....
0
by: Stan Zeidenberg | last post by:
I am using an Access report to generate an Excel spreadsheet through "Office Links" and "Analyze it with MS Excel". The headings in the Excel file are generated by the name properties. I would...
0
by: ChadDiesel | last post by:
I have a table of parts that I would like to add a field for drawings. These drawings are image files that are on different tabs in an Excel Workbook--1 image/drawing per worksheet/tab. Most of...
2
by: freddy | last post by:
How can I connect to a access db that links to an excel spreadsheet and display the data in a datagrid
1
by: ChasW | last post by:
I am seeking to create links to excel spreadsheets using DAO and VBA. The links will be "linked tables." I have working code to refresh links, but that is not what I want to do. I also need to...
2
by: Jesse Aufiero | last post by:
I use a financial system that provides data via DDE links. I'm currently using the links in Excel but I'd like to pull these links into a vb.net 2003 application so that I can do some more...
1
by: Salad | last post by:
If one distributes a front/backend app is there a good practice for refreshing the links? I was thinking that the first time the user enters the app, it could check for any tables. If the...
4
tharden3
by: tharden3 | last post by:
At work I have to spend all day punching in database entries in microsoft excel. I flip through pages and pages on this website, and on each page there are 50 links. In each link is a profile with...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.