Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I've recorded a macro, and need to make some adjustments but after a couple hours trying to find it in the Microsoft VBA documentation, I've given up and hope someone here can help me. First question, here is a portion of the code as recorded: Selection.End(xlToLeft).Select Selection.End(xlDown).Select Range("D1282").Select The first two steps put the active cell on the last cell containing data in column B. The next thing I did in recording was to press the right arrow twice. The third line above indicates a specific cell is now the active cell; what I want is for the active cell to be two columns to the right of the last cell in my data table. (The data table varies in length, so it won't always be row 1282.) Later, I want to save the file with a new file name. The file name is a text entry in a cell in my spreadsheet. This worked OK the first time I ran the macro, but the next time I got a warning that the file already existed (ie, it did not update). Here is the code that was generated; the file name I want always resides in cell F3 of the active worksheet: ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\Nick\My Documents\UNT\Physics 6750\Data Anlaysis\N=0,100, k=4, p=0.xls" _ , FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Any help would be appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro tweaking | Excel Discussion (Misc queries) | |||
Tweaking formula? | Excel Discussion (Misc queries) | |||
Tweaking Code | Excel Programming | |||
Tweaking Code | Excel Programming | |||
Formula needs tweaking - HELP!! | Excel Programming |