topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday August 19, 2025, 3:17 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 10 11 12 13 14 [15] 16 17 18 19 20 ... 25next
351
When you say ".txts" do you mean text files, all with a file extension of .txts (or .txt?)?

Sounds like you want all the text files vertically in one sheet, each block of text (one per file) below the preceding one.

And you want two additional cells, one with the name of the containing folder and the other with the parent folder of the containing folder.  Do these cells have to be in the same column as the blocks of text?  Can they be in column A and column B with the text in column C?  Are all the text files at the same level in the directory hierarchy (is each file two levels down from the "hugh folder"? 

I assume the text will be imported with each line of text being in a cell, with the following line of text in the cell below, so all the text is in one column.

Draw us a better picture.  For example, show us the directory structure of 3 sample text files, with a sample of what's in the text file (a few lines).  And then show us a shot of a little dummy spreadsheet with your 3 files entered and displayed, with folder names.

How many text files are you talking about anyway?

don't know how to import another in one sheet

Just do Data>ImportExternalData again, below the first list.
352
General Software Discussion / Re: Looking for a AutoSave program
« Last post by AndyM on September 24, 2009, 09:10 PM »
I am only trying to automate pressing of CtrlS.

Then your script should work just fine.
353
General Software Discussion / Re: Looking for a AutoSave program
« Last post by AndyM on September 24, 2009, 08:42 AM »
What happens if you just overtyped something by accident, and then the file autosaves before you correct your mistake?

If I were doing this, I'd save versions so I didn't overwrite saved files.
354
General Software Discussion / Re: Looking for a AutoSave program
« Last post by AndyM on September 24, 2009, 07:58 AM »
I didn't look much at the rest of your script, and now that I do I'm not sure it will do what you want.

It looks like you want to hit Ctrl-S in Flex Builder every 2 minutes no matter what you are doing in Flex Builder.  I wouldn't take that approach since you never know what you'll be doing/typing at that very moment.
355
General Software Discussion / Re: Looking for a AutoSave program
« Last post by AndyM on September 24, 2009, 06:56 AM »
Your MacroExpress script won't do anything unless Flexbuilder.exe is focused.  You'd have to activate the window first, which would make the "If Program is focused" line true so the rest of the macro would run.  Having the Flexbuilder.exe window activated/focused would also be necessary for the <Control>s to work.

Try a series of:
  If Window X running
    Activate Window X
    Send Save commands to Window X
  End if
  If Window Y running
    Activate Window Y
    Send Save commands to Window Y
  End if

etc
356
Living Room / Re: Question About MS Word Lists & Tables
« Last post by AndyM on September 24, 2009, 06:51 AM »
One easy way to force a list into a table in Word is to first paste it into Excel, and then copy it from there and paste it into Word.  Particularly if it's only a one-column list, Word will automatically assume anything coming from Excel should be a table.  And Excel will almost always give each line in the list a row in the spreadsheet, which when pasted into Word will definitely result in a table.

Results are less often satisfactory with multi-columned lists, but at times I've found it easier to first use Excel's importing tools to get the columns right than to do it immediately in Word.  Also some formatting tasks are easier in Excel than in Word.

Otherwise, table results in Word are sometimes hard to predict.  Sometimes creating the table first and then pasting the list into the first cell of the table works, sometimes it just puts everything in that one cell, or puts a whole new table in the first cell (not necessarily a bad thing, you can cut and paste it from there).

the text is pasted normally onto the page.

Turn on Show Formatting and tell us what is at the end of each line (paragraph mark, tab, soft-return, etc.) of your pasted list.  You might not have to do a Search& Replace to get your list into a table.  If the list is more than one column, are there tabs between the fields in each line/row?  From the way you described your source lists, I'm assuming they aren't fixed length fields.
357
Living Room / Re: Question About MS Word Lists & Tables
« Last post by AndyM on September 24, 2009, 06:45 AM »
One easy way to force a list into a table in Word is to first paste it into Excel, and then copy it from there and paste it into Word.  Particularly if it's only a one-column list, Word will automatically assume anything coming from Excel should be a table.  And Excel will almost always give each line in the list a row in the spreadsheet, which when pasted into Word will definitely result in a table.

Otherwise, table results in Word are sometimes hard to predict.  Sometimes creating the table first and then pasting the list into the first cell of the table works, sometimes it just puts everything in that one cell.

the text is pasted normally onto the page.

Turn on Show Formatting and tell us what is at the end of each line (paragraph mark, tab, soft-return, etc.) of your pasted list.  You might not have to do a Search& Replace to get your list into a table.
358
Living Room / Re: Question About MS Word Lists & Tables
« Last post by AndyM on September 23, 2009, 08:44 PM »
What happens when you copy the list from wherever and then just paste it into a blank Word document?
359
If you're main method of cloning your files is "Save As", then the script needs work.
360
It occurs to me that if, on Tuesday, you are starting with Monday.xls (already backed up on Monday), and then renaming it to Tuesday.xls by using Excel's "File>Save As" dialog, you should do that as your very first step before making any Tuesday changes, since this simple script will save & overwrite your Monday.xls backup file just before the Save As Tuesday.xls operation.

It should still be a proper Monday.xls backup, but it will have Tuesdays Modified Date.  But it won't be a proper Monday.xls if you change something before doing Save As Tuesday.xls.

Personally I would make a copy of Monday.xls in Explorer and rename it Tuesday.xls and then open the Tuesday.xls file.  Then your autobackup script will perform as desired without changing Monday.xls or the backup of Monday.xls.
361
Glad it worked  :)

(check if a space in a file name causes a problem)
362
General Software Discussion / Re: Freeware Website Creator For Dummies?
« Last post by AndyM on September 20, 2009, 10:40 AM »
.... sooner or later you'll probably want (or need) to know a lot more about how to really code a web page. When that time comes, there's an excellent free e-book that will walk you through everything you need to know about doing one up from scratch.

It's called (appropriately enough) The Web Book, ...

Nice!  Lucky coincidence since that time has come for me and I was just starting to look for things to read.

Thanks for this 40hz!!!  :Thmbsup:
363
When I work on something like this it is almost always for myself - if I break something either I fix it or I suffer.  Playing with files (saving, copying, archiving, etc.) can lead to problems, so back up everything and work with copies until you are confident.

If you put this code in ThisWorkbook, every time you save a file it will first make a copy of the file in D:\xscr, regardless of where you are putting the original.  You would have to change "D:\xscr" to whatever location you wish to use for your backup copies.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim CurFile As String
Dim BUFolder As String
CurFile = Application.ActiveWorkbook.Name
BUFolder = "D:\xscr"
On Error Resume Next
ActiveWorkbook.SaveCopyAs Filename:=BUFolder & "\" & CurFile
End Sub
 
I haven't tested this much (haven't tried it on a file already in D:\xscr).
If you invoke the SaveAs dialog, it still saves a backup copy with the original name.  When you next save the renamed file it will be backed up.  There's a better way to deal with SaveAs but if it waits for me to fool with it, I may never post this.

I don't know VBA
So you probably don't know where ThisWorkbook is  :)
Open the Visual Basic Editor (Alt-F11).
You'll see a file tree of sorts on the left.  Find your open file, and one of the items on the sublist will be This Workbook.  Click on it to open the ThisWorkbook window, paste the code in and off you go.  This code will be saved with the file, and the backup will be made if "D:\xscr" exists.  The On Error command should (I think) prevent error messages that others would have when saving the file if they don't have a folder names "D:\xscr".

If you do much work in Excel, learning some VBA and the way the VB Editor works would be worth your while.  Most of the techniques also apply to Word and other Office programs.

Btw, since the backup file is overwritten with the new file every time you save, you only have the latest version backed up.  This is fine if there's a new filename every day.  But if it's the same filename over and over, just in different locations, this scheme is inferior to one in which you save versions.
364
For a different approach than intercepting the Save commands, check out the WorkbookBeforeSave Event
365
So the only files you want to copy to a fixed additional location are the Excel files that you create, and you want them backed up every time anyone in the company saves a modified version of your file regardless of what folder that modified version is being saved to (differing job folders).

Now it really seems like the way to go is to intercept the Save and SaveAs commands.  Since it's only certain of your spreadsheets you want this to apply to, you have complete control over the process by doing it this way.  What's the downside?

--------------------
Edit:  I re-read your last post and now I'm not sure what you mean by "I only want MY XLS files to be backed up... not everyone else's".

Do you mean only the versions of the original file that you save, or the versions of the file you created that others save?
366
We save excel files all over our network drives, but would like to have a local place where copies go, automatically.

I know you said you looked at a VBA solution but since you are only needing this when running Excel, it would be simplest to deal with it as part of the File Save process.  You could write a simple script that would both save the file normally and then copy that file to a specific location.  Assign it to Ctrl-S and/or a toolbar button and/or a menu choice.
367
General Software Discussion / Re: How can I download or record streaming audio
« Last post by AndyM on September 13, 2009, 09:38 AM »
In Firefox sometimes streaming stuff is buffered in:

"C:\Documents and Settings\UserName\Local Settings\Application Data\Mozilla\Firefox\Profiles\swjjmpsr.default\Cache"

The temp files all have 10 digit alpha-numeric filenames w/ no extension.  It's easy enough to see which file is growing as it is being buffered - you just hit the Refresh button or F5 and see which file size is increasing.  When it's done growing, rename the file something.mp3 and copy it elsewhere (or copy, then rename).

There are other places besides this folder that are used for temp files, depending on the browser and site.

368
Post New Requests Here / Re: Merge .txt files but with the copy/paste method
« Last post by AndyM on September 06, 2009, 03:29 PM »
i want to make them one,to count how many 1.000 there are (quantity) though in some files there are 2,3,5 etc.In a few words i want to make an assortment.
The idea was to import them in excel and simply make a sum...
Be more specific.  What exact info would you want from the three .txt files?  Do you need to see one concatenated file with all the columns adjusted and lined up?  Or do you want that simply to get some totals or other stats, and if so is it just a few things and is it a one-time chore?

And it's 600 files...my computer is going to crash if i open them all.And then i'll have to make them all in one excel...damn i'm in such a mess
If you really have to process each file separately, 600 is worth spending the time to automate the process (personally at this point I'd be asking myself how badly I really needed this info).  

You could use VBA code in Excel to process each line of each file.  How complicated this gets depends on what you have to start with, and what you want to end up with.  



But
369
I don't know anything about instant viewer, but it sounds like there's already a hotkey.  So why not just make your own keyboard shortcut and have it send the original hotkey.

If you want to use the default instant viewer hotkey for something else, you can do that also.
370
Coding Snacks / Re: Maximize Windows "partially"
« Last post by AndyM on August 24, 2009, 11:03 AM »
Keep in mind that you could adapt Antonimo's code to work for various windows to be resized/moved depending on which window has focus, all fired with the same hotkey.  See IfWinActive, etc.
371
Coding Snacks / Re: Maximize Windows "partially"
« Last post by AndyM on August 22, 2009, 10:09 PM »
I use two Macro programs, Autohotkey and Macro Express, each has it's strengths.  This would be a snap using Macro Express, but I'm sure it could be done easily enough in AutoHotkey, particularly if you hardcode the window size for your monitor and personal preferences.  Just use the appropriate window resize command.  

More complicated if you want it to work using any size monitor, then you have to get the monitor size and have the code do the math.

Should be easy to have the macro fire with a left-click on the Maximize button, maybe not so easy to trap "Alt-Space,X", but for my own use I'd assign a different hotkey anyway.  I know you wanted to trigger the resizing by catching the actual maximization, but someone else will have to tell you how to do that.
372
Coding Snacks / Re: Maximize Windows "partially"
« Last post by AndyM on August 22, 2009, 10:44 AM »
How do I make AHK detect that a user has initiated a maximize action.

Are you looking to intercept a mouse-click on the maximize button or the keystrokes for the menu selection?

373
Post New Requests Here / Re: In huge need of a formula/macro in MS Excel
« Last post by AndyM on August 20, 2009, 11:44 PM »
index/match is the lookup you use when the value you are returning is to the left of your lookup value

I got used to using Index/Match as much for that reason as having to add the "0" parameter to unsorted lookups. 

error values in your results can also be avoided by using conditional statements

I used to use all those nested ifs, now find the conditional formatting more flexible and the shorter formulas easier to read and edit.

Still, I'd probably use an Event Change macro and avoid formulas altogether.

One of the many things I like about Excel is that there is usually eight different ways to do anything...
374
Post New Requests Here / Re: In huge need of a formula/macro in MS Excel
« Last post by AndyM on August 20, 2009, 10:03 PM »
(I fixed the files, left out range names)

Here's one way using a formula with the Match and Index functions (Vlookup is shorter but requires the lookup list to be sorted)

Rates.xls is a spreadsheet that has haircut rates (column C) for the 3 Stooges (column A).  This would correspond to your "Archive" worksheet.

Formula.xls is a spreadsheet that will populate column C if you type a customer name in column A (only for rows 2 through 15, since the formulas in column C are only in those rows).

If there is no name in Column A, or the name in Column A is not one of the 3 Stooges, then the conditional formatting of C2:C15 hides the #N/A.

You could also populate column C with an Event Change macro, much more elegant.
375
Post New Requests Here / Re: In huge need of a formula/macro in MS Excel
« Last post by AndyM on August 20, 2009, 11:50 AM »
Would this be simply a vlookup in the second workbook based on a table in the first workbook?

I'll work on this tonite if no one has gotten to it first.
Pages: prev1 ... 10 11 12 13 14 [15] 16 17 18 19 20 ... 25next