Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() i have 6 i would like to open - but not go to each file as it opens - but add the file name to the current sheet as the files open. when i close the files i would like to do the opposite and remove the file name from the current sheet ast the files close. When i close the files 2 of the files i need to save and the other 4 just close. thanks jack |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() One design suggestion: Instead of putting the names of the opened workbooks in your sheet, how about you have the names there already and just mark them "open" or "closed" or whatever in a different column? This allows your program to read the workbooks to open or close without having to have them hard-coded in the program itself; you or another user could change the list right there in the worksheet. But however you do it, you haven't asked your question yet. You want to do what you've described below, but obviously you've tried that and you're having a problem; so what's the problem? What did you try, and how is it not working? Or is it that you know nothing about VBA programming and don't know how to start? If it's that, at least say so and maybe someone will be willing to give you some tutoring. (I probably would, for one, a little at a time.) --- "Jack" wrote: i have 6 i would like to open - but not go to each file as it opens - but add the file name to the current sheet as the files open. when i close the files i would like to do the opposite and remove the file name from the current sheet ast the files close. When i close the files 2 of the files i need to save and the other 4 just close. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Bob Thanks for your reply. i have a macro that will open the files but i was trying to cut down on the visual noise and that is when the list idea came up. I understand some of the basics and what i have works but i'm trying to make it better. i appreciate your help jack "Bob Bridges" wrote: One design suggestion: Instead of putting the names of the opened workbooks in your sheet, how about you have the names there already and just mark them "open" or "closed" or whatever in a different column? This allows your program to read the workbooks to open or close without having to have them hard-coded in the program itself; you or another user could change the list right there in the worksheet. But however you do it, you haven't asked your question yet. You want to do what you've described below, but obviously you've tried that and you're having a problem; so what's the problem? What did you try, and how is it not working? Or is it that you know nothing about VBA programming and don't know how to start? If it's that, at least say so and maybe someone will be willing to give you some tutoring. (I probably would, for one, a little at a time.) --- "Jack" wrote: i have 6 i would like to open - but not go to each file as it opens - but add the file name to the current sheet as the files open. when i close the files i would like to do the opposite and remove the file name from the current sheet ast the files close. When i close the files 2 of the files i need to save and the other 4 just close. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Well, I always approve of trying to make a program better. Ok, then, it seems to me that you need to change the syntax of the assignment statement when you're closing your sheets. Change the cells .Value assignment to ..Text, and change those single quotes to double quotes (remember you're in VBA, not REXX). That should fix the immediate problem. But of course that doesn't mean another problem won't pop up behind it as soon as you have the obvious one fixed. Or if that doesn't fit your circumstances, maybe instead of my trying to guess what's wrong with your program, try this: Tell us which part of your program isn't working, and what it IS doing instead. Like this: "I want to remove the file name from worksheet 'FileList', but when I use the Range.Remove action, I get the following error message...", or "...but I don't know what command is equivalent to deleting the contents of a cell", or whatever. --- "Jack" wrote: i have a macro that will open the files but i was trying to cut down on the visual noise and that is when the list idea came up. I understand some of the basics and what i have works but i'm trying to make it better. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stock Charts Do Not Display Open and Close | Charts and Charting in Excel | |||
open and close files | Excel Worksheet Functions | |||
Sub to open n close .xls files in folders | Excel Programming | |||
fix for open/close files problem | New Users to Excel | |||
Open all linked files and close them. | Excel Programming |