Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2006

Tip: Looking for answers? Try searching our database.

Change file ref in VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
donh - 30 Nov 2006 09:30 GMT
Hi,

I have a large ish workbook and have created an index page to aid
navigation. I have also created additional menu items for users.  One
of which is a link to the Index page.  On testing I opened a new
workbook and the Index link generated an error.  On checking added
Windows("test.xls").Activate to my Sub, and now users can navigate back
to the Index page from inside or outside of the workbook, which I'm
happy with.

My Sub

Sub Index()

Windows("test.xls").Activate
Sheets("Index").Select

End Sub

is kept in my test.xls workbook and the menu updated when opened and
items removed when closed.

My question is can I get VBA to check the xls file name (at present
test.xls) and change the Windows("test.xls").Activate to match if file
has been renamed.

Thanks for any help

DonH
Bob Phillips - 30 Nov 2006 10:21 GMT
Try uisng ThisWorkbook.Activate

Signature

---

HTH

Bob

(change the xxxx to gmail if mailing direct)

> Hi,
>
[quoted text clipped - 25 lines]
>
> DonH
donh - 30 Nov 2006 10:58 GMT
Thanks Bob ,

Worked fine

DonH

> Try uisng ThisWorkbook.Activate
>
[quoted text clipped - 35 lines]
> >
> > DonH

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.