[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Files to folder

Posted on 2000-05-02
7
Medium Priority
?
190 Views
Last Modified: 2011-09-20
I have a program which I have a menu to automatically save a file. The file is being temporarily saved to the memory. Once I unload the program my files are lost. So, I created a folder so that my files would be saved into that folder. My problem is how do I do that. I need help on doing this. I need to save the file to a folder. I don't want to create a flat file (ie text file). This works like a Favorites for Internet Explorer. Where if you wanted to bookmark something, that page is saved in the Favorites folder. The file is the actual link to the web site.
0
Comment
Question by:VBNewbie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Expert Comment

by:pauljk
ID: 2770989
Here is how you can create a file with the link....

Open "C:\Test.txt" For Output As #1
' Print to the output file.
Print #1, strTextToPutInFile
' Close the output file.
Close #1
   
0
 

Author Comment

by:VBNewbie
ID: 2771042
Pauljk I don't want it to create a text file. I would like to save the file as is (ie word doc, excel files ,etc.). Could also please unlock the question.

Thanks
0
 

Author Comment

by:VBNewbie
ID: 2771071
The program should work much like the saving a bookmark or favorites for the Internet Explorer. What I want it to do is when the user clicks on the menu and click save, the file will be automatically saved to a folder (ie C:\Temp\Test). Thanks again. Pauljk I have already done that in my program. I don't want my file to be saved as a flat file.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:pauljk
ID: 2771075
What is the code that you used to save the file to memory?
0
 
LVL 2

Expert Comment

by:bhamilto
ID: 2771250
Do you mean you want to create an internet shortcut?
If so check out:
http://www.mvps.org/vbnet/
and search for internet shortcut
0
 
LVL 7

Accepted Solution

by:
Vbmaster earned 300 total points
ID: 2771475
Do you have the file in memory as a byte array? If so the solution is

  Dim Filenr as Integer

  Filenr = FreeFile
  Open filename For Binary As #Filenr
  Put #Filenr, , ByteArray()
  Close #Filenr

This will store the data to the file "just-as-it-is". Check your helpfile's info for more info on the Put statement.
0
 

Author Comment

by:VBNewbie
ID: 2773481
Thanks for help guys.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question