473,378 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

VB6 Can I have the app save to my application dir automatic

104 100+
Hi,

I have written my application and given the text files a dir to save to. Is there a way that that dir would read as a wildcard wherever I install it to? Example I have the drive path listed as c:\......... , I want to install to the d drive without having to change the application path in the code.

Here is my code:
Dim r1 As String
Dim fileName As String
fileName = "C:\miprice software\data\r1.txt"
r1 = FreeFile
Open fileName For Output As #r1
Print #r1, Text1.Text
Close #r1



I want the "filename = "c"............... to be a wildcard....
Just the \Miprice software\Data\r1.txt stays static.

Hope this makes sense.

Thanks
Werner
Aug 3 '07 #1
4 1303
Killer42
8,435 Expert 8TB
Two things come to mind.

First, App.Path will give you the path that the program was installed to, which may be enough.

Secondly, you can have the installation procedure create entries for you in the registry to identify the save path. Not sure about the supplied Package and Deployment wizard, but if you get a decent installation creator such as InstallShield, I'm sure they can do that.
Aug 5 '07 #2
Wernerh
104 100+
Hi,

Thanks, I went the app.path route and it works perfectly.

Thanks again
Werner
Aug 5 '07 #3
Killer42
8,435 Expert 8TB
Thanks, I went the app.path route and it works perfectly.
Great! Glad we could help. :)
Aug 5 '07 #4
Wernerh
104 100+
Great! Glad we could help. :)
Hi Killer 42,

I have posted another question about VB6 button opeining a web page of choice. Is this function not possible?

Thanks
Aug 5 '07 #5

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

Similar topics

2
by: Chris Lobdell | last post by:
Hey, everyone. For the past two years, we have offered files for download through a secure website. Users, after clicking on a link, are redirected to a PHP page that passes the appropriate...
0
by: cpavon | last post by:
Hello everyone, I am fairly new to MACT, I am currently trying to parse the oResponse.Body to retrive a dynamic values...store in an array and then randomly post those values. Does anyone...
7
by: Javaman59 | last post by:
This is about finding the right point at which to save user entered data in the registry, so that when the application is restarted, the saved values will be restored. I want this behaviour to be...
2
by: Olaf Baeyens | last post by:
I want to convert one bitmap file to another one. For example load as bmp and save as jpg. The loading part is simple I do this: Stream BitmapStream =...
1
by: Pavils Jurjans | last post by:
Hello, I have a couple of unclear questions about ASP.NET sessions: First, I'd like to have some way to see how many sessions currently are running on the certain application, and, possibly, have...
4
by: Ray | last post by:
Does anyone out there have experience with using Db2 8.2 with a program called MISys (also known as ACCPAC). I am having some problems with the application running exteremly slow on workstations...
0
by: Hexman | last post by:
Hello All, Its a bit more complicated than the subject line implies. A website that I use for information allows me to click on a link and their .PDF displays in IE's browser window.. Since...
4
by: Dan Aldean | last post by:
Hi, I have an application that needs to save some info in the database when the user closes the application by clicking the x box in the right top corner of the window. I tried the...
2
by: Matuag | last post by:
Hi All, I want to create following command buttons on a Form which users can edit. Save ( Save Changes made) Cancel ( Undo data changes) Exit ( Close form) I am using Macros for each of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.