ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Why get Ref in my cells ? (https://www.excelbanter.com/excel-programming/322889-why-get-ref-my-cells.html)

Mario Reiley

Why get Ref in my cells ?
 
Hi group

I'm change the link on my Worksheets via VBA code and all in fine but the
results are wrong. All the time get REF errors.

Why don't get my Results ?

Here is my code:

Private Sub ChangeMyLinkBath()
ActiveWorkbook.ChangeLink Name:= _
"C:\My Project\MODULO SDN-SCI\Productos
Requeridos\Mecanica\Documentos\Bombas\H.C. Bombas SCI .xls" _
, NewName:= _
"C:\My Project\H.C. Bombas SCI .xls" _
, Type:=xlExcelLinks

End Sub

Any Advisor is Wellcome
Mario



Jake Marx[_3_]

Why get Ref in my cells ?
 
Hi Mario,

Are you sure the filenames are correct in your code? Try this in the
Immediate Window (Ctrl+g from the VBE):

?Dir$("C:\My Project\MODULO SDN-SCI\Productos
Requeridos\Mecanica\Documentos\Bombas\H.C. Bombas SCI .xls")

?Dir$("C:\My Project\H.C. Bombas SCI .xls")

Do you get values for each of these statements, or does one of them return
an empty string?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Mario Reiley wrote:
Hi group

I'm change the link on my Worksheets via VBA code and all in fine but
the results are wrong. All the time get REF errors.

Why don't get my Results ?

Here is my code:

Private Sub ChangeMyLinkBath()
ActiveWorkbook.ChangeLink Name:= _
"C:\My Project\MODULO SDN-SCI\Productos
Requeridos\Mecanica\Documentos\Bombas\H.C. Bombas SCI .xls" _
, NewName:= _
"C:\My Project\H.C. Bombas SCI .xls" _
, Type:=xlExcelLinks

End Sub

Any Advisor is Wellcome
Mario



Mario Reiley

Why get Ref in my cells ?
 
Hi, Jake thanks for the response

?Dir$("C:\My Project\MODULO SDN-SCI\Productos
Requeridos\Mecanica\Documentos\Bombas\H.C. Bombas SCI .xls")

?Dir$("C:\My Project\H.C. Bombas SCI .xls")

don't return anything what is happenig , please let me know ..!

Mario


"Jake Marx" escribió en el mensaje
...
Hi Mario,

Are you sure the filenames are correct in your code? Try this in the
Immediate Window (Ctrl+g from the VBE):

?Dir$("C:\My Project\MODULO SDN-SCI\Productos
Requeridos\Mecanica\Documentos\Bombas\H.C. Bombas SCI .xls")

?Dir$("C:\My Project\H.C. Bombas SCI .xls")

Do you get values for each of these statements, or does one of them return
an empty string?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Mario Reiley wrote:
Hi group

I'm change the link on my Worksheets via VBA code and all in fine but
the results are wrong. All the time get REF errors.

Why don't get my Results ?

Here is my code:

Private Sub ChangeMyLinkBath()
ActiveWorkbook.ChangeLink Name:= _
"C:\My Project\MODULO SDN-SCI\Productos
Requeridos\Mecanica\Documentos\Bombas\H.C. Bombas SCI .xls" _
, NewName:= _
"C:\My Project\H.C. Bombas SCI .xls" _
, Type:=xlExcelLinks

End Sub

Any Advisor is Wellcome
Mario






All times are GMT +1. The time now is 02:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com