Selasa, 12 Februari 2013

RE: [ExcelVBA] Filepath referencing a cell used to autoopen a file or *.xll file

 

The problem seems to be in

filePath = Paths.Range(sFileLocMarket).Value

Is "Paths" the name of a worksheet?

If so try

filePath = Worksheets("Paths").range(sFileLocMarket).Value

Best Regards
David Grugeon
Excel VBA Group Moderator

-----Original Message-----
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf
Of pablorynx
Sent: Tuesday, 12 February 2013 3:59 PM
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] Filepath referencing a cell used to autoopen a file or
*.xll file

This is the code I have in "ThisWorkbook"
sFileLocMarket is a named range in my workbook I am unable to get the code
to compile, I'm sure I am getting this wrong.

>>
Option Explicit
Const xllName = "schedulesV1.0.2.xll"
Dim filePath As String
filePath = Paths.Range(sFileLocMarket).Value
filePath = filePath & "\" & xllName


Private Sub Workbook_Open()

Application.RegisterXLL filePath

End Sub

>>

------------------------------------

----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go
here: http://www.mousetrax.com/techtrax to enter the ezine, then search the
ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------Yahoo! Groups Links

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar