Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Links and Chdir

Hi
I have 2 questions that I hope someone can help me with

1) Is there any way to turn of the update links box that appears in a workbook that references another workbook. I have tried looking at the links box under editlink, but the manual button is greyed out.

2) I have the code

chdir "\\Fs8\ssd-css-fin\eco\eco 2004-2005\eco_0405\SystemFiles\eco\
Application.Dialogs(xlDialogOpen).Sho

The first line is simply a ' virtual ' network set-up on my hard drive to imitate my work set-up. But sometimes the open file dialogue box points to the right path and sometimes it does not. This is true even if I use a simple path such as c:\
Is there a reason why it is so temperamental

All help is greatly appreciated

H.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Links and Chdir

Hi Hansol

See the VBA help for Workbooks.open
look at the UpdateLinks argument


For point 2
Try to use this and see if it work


Dim FName As Variant
Dim wb As Workbook

your chdir code

FName = Application.GetOpenFilename(filefilter:="Excel Files (*.xls), *.xls")
If FName < False Then
Set wb = Workbooks.Open(FName)
MsgBox "your code"
wb.Close
End If



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Hansol" wrote in message ...
Hi,
I have 2 questions that I hope someone can help me with;

1) Is there any way to turn of the update links box that appears in a workbook that references another workbook. I have tried

looking at the links box under editlink, but the manual button is greyed out.

2) I have the code;

chdir "\\Fs8\ssd-css-fin\eco\eco 2004-2005\eco_0405\SystemFiles\eco\"
Application.Dialogs(xlDialogOpen).Show

The first line is simply a ' virtual ' network set-up on my hard drive to imitate my work set-up. But sometimes the open file

dialogue box points to the right path and sometimes it does not. This is true even if I use a simple path such as c:\.
Is there a reason why it is so temperamental?

All help is greatly appreciated.

H.



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Links and Chdir

This isn't a programmed solution to the links msg
suppression problem, but you might find it handy.
I could not suppress those pesky msgs checking off boxes I
found in the LINKS window, but I went to
TOOLS-OPTIONS-EDIT and found on the bottom left of the
window, a list of 4 check boxes, one of which says "Ask to
update links". That box was checked. I unchecked it, and
the msgs stopped!
-----Original Message-----
Hi Hansol

See the VBA help for Workbooks.open
look at the UpdateLinks argument


For point 2
Try to use this and see if it work


Dim FName As Variant
Dim wb As Workbook

your chdir code

FName = Application.GetOpenFilename(filefilter:="Excel

Files (*.xls), *.xls")
If FName < False Then
Set wb = Workbooks.Open(FName)
MsgBox "your code"
wb.Close
End If



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Hansol" wrote in

message
...
Hi,
I have 2 questions that I hope someone can help me with;

1) Is there any way to turn of the update links box that

appears in a workbook that references another workbook. I
have tried
looking at the links box under editlink, but the manual

button is greyed out.

2) I have the code;

chdir "\\Fs8\ssd-css-fin\eco\eco

2004-2005\eco_0405\SystemFiles\eco\"
Application.Dialogs(xlDialogOpen).Show

The first line is simply a ' virtual ' network set-up on

my hard drive to imitate my work set-up. But sometimes the
open file
dialogue box points to the right path and sometimes it

does not. This is true even if I use a simple path such as c:\.
Is there a reason why it is so temperamental?

All help is greatly appreciated.

H.



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Links and Chdir

That works by updating the links without prompt. It is the solution if that
is what you want. Until xl2002 there isn't a non-programming solution. In
excel 2002 an option was added under Edit=Links.


Previously posted by Rob Bovey:

Private Declare Function SetCurrentDirectoryA Lib _
"kernel32" (ByVal lpPathName As String) As Long

Sub ChDirNet(szPath As String)
Dim lReturn As Long
lReturn = SetCurrentDirectoryA(szPath)
If lReturn = 0 Then Err.Raise vbObjectError + 1, "Error setting path."
End Sub

' sample usage

Sub FindFile()
ChDirNet "\\LOGD0FILES\OGILVTW\Docs\Temp"
fName = Application.GetOpenFileName
End Sub

--
Regards,
Tom Ogilvy



wrote in message
...
This isn't a programmed solution to the links msg
suppression problem, but you might find it handy.
I could not suppress those pesky msgs checking off boxes I
found in the LINKS window, but I went to
TOOLS-OPTIONS-EDIT and found on the bottom left of the
window, a list of 4 check boxes, one of which says "Ask to
update links". That box was checked. I unchecked it, and
the msgs stopped!
-----Original Message-----
Hi Hansol

See the VBA help for Workbooks.open
look at the UpdateLinks argument


For point 2
Try to use this and see if it work


Dim FName As Variant
Dim wb As Workbook

your chdir code

FName = Application.GetOpenFilename(filefilter:="Excel

Files (*.xls), *.xls")
If FName < False Then
Set wb = Workbooks.Open(FName)
MsgBox "your code"
wb.Close
End If



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Hansol" wrote in

message
...
Hi,
I have 2 questions that I hope someone can help me with;

1) Is there any way to turn of the update links box that

appears in a workbook that references another workbook. I
have tried
looking at the links box under editlink, but the manual

button is greyed out.

2) I have the code;

chdir "\\Fs8\ssd-css-fin\eco\eco

2004-2005\eco_0405\SystemFiles\eco\"
Application.Dialogs(xlDialogOpen).Show

The first line is simply a ' virtual ' network set-up on

my hard drive to imitate my work set-up. But sometimes the
open file
dialogue box points to the right path and sometimes it

does not. This is true even if I use a simple path such as c:\.
Is there a reason why it is so temperamental?

All help is greatly appreciated.

H.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow opening links between workbooks with links created in 2003 Russell Excel Discussion (Misc queries) 0 December 14th 09 02:59 PM
Update links box gives Continue or Edit Links dialog KarenF Excel Discussion (Misc queries) 0 May 18th 07 01:17 PM
Edit Links: Changing links on a protected worksheet Halibut68 Excel Discussion (Misc queries) 0 April 28th 06 11:03 AM
EXCEL - LINKS cannot easily get list of all links & names in book Tuba Joe Excel Worksheet Functions 1 September 29th 05 10:33 PM
application.dialogs(xlDialogSaveAs) AND CHDIR Jules[_2_] Excel Programming 1 September 3rd 03 08:27 PM


All times are GMT +1. The time now is 10:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"