473,473 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Construct a xls file name and open/activate it

1 New Member
I am not able to construct a workbook file name as a string and use it to activate a workbook.

Option Private Module
Public wbVersion As String
Public sFilePath As String
Public wbCntl As Workbook
Public wbFilename as String

Sub SetConstantVariables()
wbVersion = " v12.xls"
sFilePath = "I:\Documents and Settings\Grant\My Documents\NeuroFission\Development\"
wbFilename = sFilePath + "Control" + wbVersion
wbFilename.Activate
or
Workbooks(wbFilename).Activate
etc
.
.

Apparently, none of the methods for activating the workbook works for me, using a predefined string name for the workbook. Can this be done? What might I be doing wrong?
Grant
Mar 16 '10 #1
1 1121
kadghar
1,295 Recognized Expert Top Contributor
perhaps if you open it first:

Workbooks.open(wbfilename)

then activate it.
Mar 17 '10 #2

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

Similar topics

11
by: sur | last post by:
Hello, My problem is that File.Exists works fine if my file is on my local drive but returns false if its on any other drive. I think that the issue is probably file permissions and so I have...
18
by: Torben Laursen | last post by:
Hi Can anyone tell me what is the short-cut to switch between a .h and .cpp file, thanks Torben Laursen ---
2
by: Yuriy | last post by:
I have a .NET server button on a form. When the user clicks it, I'd like to (behind the scenes) create a pdf file containing the data that they're currently viewing, then somehow activate the "Do...
3
by: tigrrgrr42 | last post by:
I am working(vb.net03and05) with word documents stored in a sql db and I am currently bringing them from a byte array into a temp file to pop into word and make word do its thing as a com object. ...
1
by: Raggie | last post by:
Gentlemen, first of all I have a general question... is it possible to open an excel file directly through the ASP.NET page without to install Excel on server? I tried something on my...
0
by: senthilavs | last post by:
Hi, Im having word document in the Server Machine. While im trying to open the file in Client Machine file is opening in Server only. I need to open in the client only. This is an ASP.NET project...
28
by: Ilias Lazaridis | last post by:
I understand that I can use __metaclass__ to create a class which modifies the behaviour of another class. How can I add this metaclass to *all* classes in the system? (In ruby I would alter...
4
patjones
by: patjones | last post by:
Hi everyone: I have a form in my database called "frmChecks". In the properties for this form, I set On Load to , which points to some code in VB that maximizes the form window and sets a...
2
by: moon123 | last post by:
We have to program it in two parts: the lexical analyzer and the syntax analyzer plus semantic.The lexical analyzer should recognize the token using DFA and return the token and the value. The syntax...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.