Copy to last row macro

Can someone look at this macro that I copied from a website and tell
me why the code is not working for me. My source data work sheets is
named "Input KPI" and my destination worksheet is named "KPI Dash2". I
get a sub or function not defined error when I try to run and it seems
to highlight the last row code. I have limited knowledge of VBA so
maybe I am doing something wrong.

I need to copy only non-blank cells in a certain range and have them
copy to another worksheets first empty row in a certain range
Not sure if this code will do that.


Here is the code I was trying to use.

thanks,
Bill

Sub Copy_1_Value_PasteSpecial()
    Dim SourceRange As Range, DestRange As Range
    Dim DestSheet As Worksheet, Lr As Long

    With Application
        .ScreenUpdating = False
        .EnableEvents = False
    End With

    'fill in the Source Sheet and range
    Set SourceRange = Sheets("Input KPI").Range("A1:K1")

    'Fill in the destination sheet and call the LastRow
    'function to find the last row
    Set DestSheet = Sheets("KPI Dash2")
    Lr = LastRow(DestSheet)

    'With the information from the LastRow function we can
    'create a destination cell
    Set DestRange = DestSheet.Range("A" & Lr + 1)

    'Copy the source range and use PasteSpecial to paste in
    'the destination cell
    SourceRange.Copy
    DestRange.PasteSpecial xlPasteValues, , False, False
    Application.CutCopyMode = False

    With Application
        .ScreenUpdating = True
        .EnableEvents = True
    End With

End Sub
0
4/27/2009 1:36:32 PM
excel 39879 articles. 2 followers. Follow

4 Replies
412 Views

Similar Articles

[PageSpeed] 47

why not
sub copyit()
with sheets("KPI Dash2")
lr=.cells(rows.count,"a").end(xlup).row+1
    .range(cells(lr,"a"),cells(lr,"k").value= _
Sheets("Input KPI").Range("A1:K1").value
end with
end sub

-- 
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
"Thomp" <williamthomp@gmail.com> wrote in message 
news:9710d1d3-61e0-4945-97d3-8228b03895e1@r31g2000prh.googlegroups.com...
> Can someone look at this macro that I copied from a website and tell
> me why the code is not working for me. My source data work sheets is
> named "Input KPI" and my destination worksheet is named "KPI Dash2". I
> get a sub or function not defined error when I try to run and it seems
> to highlight the last row code. I have limited knowledge of VBA so
> maybe I am doing something wrong.
>
> I need to copy only non-blank cells in a certain range and have them
> copy to another worksheets first empty row in a certain range
> Not sure if this code will do that.
>
>
> Here is the code I was trying to use.
>
> thanks,
> Bill
>
> Sub Copy_1_Value_PasteSpecial()
>    Dim SourceRange As Range, DestRange As Range
>    Dim DestSheet As Worksheet, Lr As Long
>
>    With Application
>        .ScreenUpdating = False
>        .EnableEvents = False
>    End With
>
>    'fill in the Source Sheet and range
>    Set SourceRange = Sheets("Input KPI").Range("A1:K1")
>
>    'Fill in the destination sheet and call the LastRow
>    'function to find the last row
>    Set DestSheet = Sheets("KPI Dash2")
>    Lr = LastRow(DestSheet)
>
>    'With the information from the LastRow function we can
>    'create a destination cell
>    Set DestRange = DestSheet.Range("A" & Lr + 1)
>
>    'Copy the source range and use PasteSpecial to paste in
>    'the destination cell
>    SourceRange.Copy
>    DestRange.PasteSpecial xlPasteValues, , False, False
>    Application.CutCopyMode = False
>
>    With Application
>        .ScreenUpdating = True
>        .EnableEvents = True
>    End With
>
> End Sub 

0
dguillett1 (2487)
4/27/2009 3:22:25 PM
On Apr 27, 10:22=A0am, "Don Guillett" <dguille...@austin.rr.com> wrote:
> why not
> sub copyit()
> with sheets("KPI Dash2")
> lr=3D.cells(rows.count,"a").end(xlup).row+1
> =A0 =A0 .range(cells(lr,"a"),cells(lr,"k").value=3D _
> Sheets("Input KPI").Range("A1:K1").value
> end with
> end sub
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> dguille...@austin.rr.com"Thomp" <williamth...@gmail.com> wrote in message
>
> news:9710d1d3-61e0-4945-97d3-8228b03895e1@r31g2000prh.googlegroups.com...
>
>
>
> > Can someone look at this macro that I copied from a website and tell
> > me why the code is not working for me. My source data work sheets is
> > named "Input KPI" and my destination worksheet is named "KPI Dash2". I
> > get a sub or function not defined error when I try to run and it seems
> > to highlight the last row code. I have limited knowledge of VBA so
> > maybe I am doing something wrong.
>
> > I need to copy only non-blank cells in a certain range and have them
> > copy to another worksheets first empty row in a certain range
> > Not sure if this code will do that.
>
> > Here is the code I was trying to use.
>
> > thanks,
> > Bill
>
> > Sub Copy_1_Value_PasteSpecial()
> > =A0 =A0Dim SourceRange As Range, DestRange As Range
> > =A0 =A0Dim DestSheet As Worksheet, Lr As Long
>
> > =A0 =A0With Application
> > =A0 =A0 =A0 =A0.ScreenUpdating =3D False
> > =A0 =A0 =A0 =A0.EnableEvents =3D False
> > =A0 =A0End With
>
> > =A0 =A0'fill in the Source Sheet and range
> > =A0 =A0Set SourceRange =3D Sheets("Input KPI").Range("A1:K1")
>
> > =A0 =A0'Fill in the destination sheet and call the LastRow
> > =A0 =A0'function to find the last row
> > =A0 =A0Set DestSheet =3D Sheets("KPI Dash2")
> > =A0 =A0Lr =3D LastRow(DestSheet)
>
> > =A0 =A0'With the information from the LastRow function we can
> > =A0 =A0'create a destination cell
> > =A0 =A0Set DestRange =3D DestSheet.Range("A" & Lr + 1)
>
> > =A0 =A0'Copy the source range and use PasteSpecial to paste in
> > =A0 =A0'the destination cell
> > =A0 =A0SourceRange.Copy
> > =A0 =A0DestRange.PasteSpecial xlPasteValues, , False, False
> > =A0 =A0Application.CutCopyMode =3D False
>
> > =A0 =A0With Application
> > =A0 =A0 =A0 =A0.ScreenUpdating =3D True
> > =A0 =A0 =A0 =A0.EnableEvents =3D True
> > =A0 =A0End With
>
> > End Sub- Hide quoted text -
>
> - Show quoted text -

Don, I got a syntax error. I think I am making some kind of error when
I copy it. The .range  and Sheets line is showing up in red

Sub copyit()
With Sheets("KPI Dash2")
Lr =3D .Cells(Rows.Count, "a").End(xlUp).Row + 1
  .range(cells(lr,"a"),cells(lr,"k").value=3D _
Sheets("Input KPI").Range("A1:K1").Value
End With
End Sub
0
4/27/2009 4:12:30 PM
The .range line ended with a line continuation which is a space and an 
underscore instead of making it ONE line.

-- 
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
"Thomp" <williamthomp@gmail.com> wrote in message 
news:ddcc1bb2-4ab4-46ad-a28a-d0db4c3cbb56@v35g2000pro.googlegroups.com...
On Apr 27, 10:22 am, "Don Guillett" <dguille...@austin.rr.com> wrote:
> why not
> sub copyit()
> with sheets("KPI Dash2")
> lr=.cells(rows.count,"a").end(xlup).row+1
> .range(cells(lr,"a"),cells(lr,"k").value= _
> Sheets("Input KPI").Range("A1:K1").value
> end with
> end sub
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> dguille...@austin.rr.com"Thomp" <williamth...@gmail.com> wrote in message
>
> news:9710d1d3-61e0-4945-97d3-8228b03895e1@r31g2000prh.googlegroups.com...
>
>
>
> > Can someone look at this macro that I copied from a website and tell
> > me why the code is not working for me. My source data work sheets is
> > named "Input KPI" and my destination worksheet is named "KPI Dash2". I
> > get a sub or function not defined error when I try to run and it seems
> > to highlight the last row code. I have limited knowledge of VBA so
> > maybe I am doing something wrong.
>
> > I need to copy only non-blank cells in a certain range and have them
> > copy to another worksheets first empty row in a certain range
> > Not sure if this code will do that.
>
> > Here is the code I was trying to use.
>
> > thanks,
> > Bill
>
> > Sub Copy_1_Value_PasteSpecial()
> > Dim SourceRange As Range, DestRange As Range
> > Dim DestSheet As Worksheet, Lr As Long
>
> > With Application
> > .ScreenUpdating = False
> > .EnableEvents = False
> > End With
>
> > 'fill in the Source Sheet and range
> > Set SourceRange = Sheets("Input KPI").Range("A1:K1")
>
> > 'Fill in the destination sheet and call the LastRow
> > 'function to find the last row
> > Set DestSheet = Sheets("KPI Dash2")
> > Lr = LastRow(DestSheet)
>
> > 'With the information from the LastRow function we can
> > 'create a destination cell
> > Set DestRange = DestSheet.Range("A" & Lr + 1)
>
> > 'Copy the source range and use PasteSpecial to paste in
> > 'the destination cell
> > SourceRange.Copy
> > DestRange.PasteSpecial xlPasteValues, , False, False
> > Application.CutCopyMode = False
>
> > With Application
> > .ScreenUpdating = True
> > .EnableEvents = True
> > End With
>
> > End Sub- Hide quoted text -
>
> - Show quoted text -

Don, I got a syntax error. I think I am making some kind of error when
I copy it. The .range  and Sheets line is showing up in red

Sub copyit()
With Sheets("KPI Dash2")
Lr = .Cells(Rows.Count, "a").End(xlUp).Row + 1
  .range(cells(lr,"a"),cells(lr,"k").value= _
Sheets("Input KPI").Range("A1:K1").Value
End With
End Sub 

0
dguillett1 (2487)
4/27/2009 4:27:35 PM
I was missing a ) in the macro I sent.
Since you are only getting values anyway and you want the formatting, use:

Sub copyit3() 'or since it's only value just copy
With Sheets(" KPI Dash2 ")
Lr = .Cells(Rows.Count, "a").End(xlUp).Row + 1
 Sheets("Input KPI").Range("A1:K1").Copy .Cells(Lr, "a")
End With
End Sub

-- 
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
"Don Guillett" <dguillett1@austin.rr.com> wrote in message 
news:uezEZU1xJHA.1716@TK2MSFTNGP03.phx.gbl...
>
> The .range line ended with a line continuation which is a space and an 
> underscore instead of making it ONE line.
>
> -- 
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> dguillett1@austin.rr.com
> "Thomp" <williamthomp@gmail.com> wrote in message 
> news:ddcc1bb2-4ab4-46ad-a28a-d0db4c3cbb56@v35g2000pro.googlegroups.com...
> On Apr 27, 10:22 am, "Don Guillett" <dguille...@austin.rr.com> wrote:
>> why not
>> sub copyit()
>> with sheets("KPI Dash2")
>> lr=.cells(rows.count,"a").end(xlup).row+1
>> .range(cells(lr,"a"),cells(lr,"k").value= _
>> Sheets("Input KPI").Range("A1:K1").value
>> end with
>> end sub
>>
>> --
>> Don Guillett
>> Microsoft MVP Excel
>> SalesAid Software
>> dguille...@austin.rr.com"Thomp" <williamth...@gmail.com> wrote in message
>>
>> news:9710d1d3-61e0-4945-97d3-8228b03895e1@r31g2000prh.googlegroups.com...
>>
>>
>>
>> > Can someone look at this macro that I copied from a website and tell
>> > me why the code is not working for me. My source data work sheets is
>> > named "Input KPI" and my destination worksheet is named "KPI Dash2". I
>> > get a sub or function not defined error when I try to run and it seems
>> > to highlight the last row code. I have limited knowledge of VBA so
>> > maybe I am doing something wrong.
>>
>> > I need to copy only non-blank cells in a certain range and have them
>> > copy to another worksheets first empty row in a certain range
>> > Not sure if this code will do that.
>>
>> > Here is the code I was trying to use.
>>
>> > thanks,
>> > Bill
>>
>> > Sub Copy_1_Value_PasteSpecial()
>> > Dim SourceRange As Range, DestRange As Range
>> > Dim DestSheet As Worksheet, Lr As Long
>>
>> > With Application
>> > .ScreenUpdating = False
>> > .EnableEvents = False
>> > End With
>>
>> > 'fill in the Source Sheet and range
>> > Set SourceRange = Sheets("Input KPI").Range("A1:K1")
>>
>> > 'Fill in the destination sheet and call the LastRow
>> > 'function to find the last row
>> > Set DestSheet = Sheets("KPI Dash2")
>> > Lr = LastRow(DestSheet)
>>
>> > 'With the information from the LastRow function we can
>> > 'create a destination cell
>> > Set DestRange = DestSheet.Range("A" & Lr + 1)
>>
>> > 'Copy the source range and use PasteSpecial to paste in
>> > 'the destination cell
>> > SourceRange.Copy
>> > DestRange.PasteSpecial xlPasteValues, , False, False
>> > Application.CutCopyMode = False
>>
>> > With Application
>> > .ScreenUpdating = True
>> > .EnableEvents = True
>> > End With
>>
>> > End Sub- Hide quoted text -
>>
>> - Show quoted text -
>
> Don, I got a syntax error. I think I am making some kind of error when
> I copy it. The .range  and Sheets line is showing up in red
>
> Sub copyit()
> With Sheets("KPI Dash2")
> Lr = .Cells(Rows.Count, "a").End(xlUp).Row + 1
>  .range(cells(lr,"a"),cells(lr,"k").value= _
> Sheets("Input KPI").Range("A1:K1").Value
> End With
> End Sub 

0
dguillett1 (2487)
4/27/2009 8:59:15 PM
Reply:

Similar Artilces:

creating a macro
I am creating a sheet that has 3 basic columns. (see below). What I want is to create a macro that will automatically give me the lowest bid of the three. I would also like to create a column that shows the differnces in the three. For example Estimate #1 is $500 more than estimate #2; Estimate #3 is $700 lower than Estimate #1 and $200 lower than Estimate #2 Can this be done? A B C D ESTIMATE #1 ESTIMATE #2 ESTIMATE #3 BID $2,000.00 $1,500.00 $1,300.00 Any formula for th...

Formula for current month minus one = Quarter number in a macro.
I have a macro that does several things. The last step should be to save the file to a network drive with a name and quarter number appended to it. The file save command I have got is: - ActiveWorkbook.SaveAs Filename:= _ "Y:\Skip Register\Quarterly Charging Period ?", FileFormat:=xlExcel9795, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False The ? in the file name should be substituted by the formula as described below. The macro is to be run in the month following a quarter (i.e. run macro in April to get Quar...

Text is added as attachment after copy and paste
Hi I am using outlook 2000 and every time I want to copy and paste text from somewhere else (e.g. browser), it adds the content as an html-page-attachment to my new mail. I just want to have it added as simple text in the mail-body regards R. Save the text in notepad or something and then Insert the file - but check the button so it inserts it as text, not just as an attachment ;-) r@gnar.de wrote: > Hi > > I am using outlook 2000 and every time I want to copy and paste text > from somewhere else (e.g. browser), it adds the content as an > html-page-attachment to my new ...

macros and hlookup
I have a macro that enters a new row and then carries out a series of instructions based upon this inserted row, for example entering 'filled down' calculations in the new row and other similar processes. I would also like the macro to amend a HLOOKUP function (as when the row is inserted the array size increases by one, as does the required row). For example, before the macro is run the function looks like this: =HLOOKUP('Project Summary'!B1,'Associates Hours (actuals)'! S5:AD76,72,TRUE)*30 but then after i need the function to look like this: =HLOOKUP('Pr...

Applying same macro to all worksheets in workbook
HI, I am trying to find an easy way to apply a macro that changes the absolute value of a couple of cells and changes some plot formatting to all sheets in a workbook. All sheets are the same and need the same macro applied to them, I have recorded the macro such that I can click on a worksheet and hit a keyboard command to execute this, but I have to individually select each worksheet and repeat this throughout, how can this be automated? Thanks, Josh Rewrite the macro so it takes a worksheet as an argument. Then write a second macro that iterates your worksheets and passes them one at...

more rows highlight than I want
2010 Excel version. I sometimes am working on the spreadsheet and all of a sudden I click one row on the side and three or four rows are highlighted and the highlighted rows will not go away. If I press another row there are still the other highlighted rows. Hi, Two suggestions. First tap F8 and see if the problem goes away. Second there is a know bug in E2007 and this 'may' also be in 2010 but I not seen it posted. In E2007 for no apparent reason multiple cells get selected instead of a single cell, if you alter the zoom level up and then back to normal the problem...

can autofilters be applied to rows rather than columns?
Is it possible to filter a database set out in rows instead of columns? Alternatively what would be the best way to isolate matching data without using HLookups? cheers, Nadia I don't think that it will work that way. Are you able to Transpose your database? If so, then you'd be able to use the Auto Filter. Rgds, ScottO "Nadia" <Nadia@discussions.microsoft.com> wrote in message news:FC262080-7D90-4A6D-9582-2AE11DB4A87E@microsoft.com... | Is it possible to filter a database set out in rows instead of columns? | Alternatively what would be the best way to isolate mat...

macro disabled permanently
Greetings, I interrupted a macro I wrote that went into infinite loop by hitting ESC. I fixed the macro function which is tied to "Worksheet_Change". Now it never gets triggered. I put break points in code; not executed at all. I close/open excel and respond to security dialog as "enable macros", still not working. I don't know what happened but code never gets executed. I don't know what happened. Help appreciated, Cagdas Ozgenc Sounds like events have been disabled. Type Application.EnableEvents = True in the VBIDE immediate window. -- HTH Bob Phillip...

Delete rows if AF and AY empty but F has information
I am looking for help getting a macro that works and performs the following steps. Check Column F for information If Column F has information check Column AF and AY for information If Column AF and AY are empty delete the rows. Can you help? Please disregard this post. I posted in wrong section. "Louie" wrote: > I am looking for help getting a macro that works and performs the following > steps. > > Check Column F for information > If Column F has information check Column AF and AY for information > If Column AF and AY are empty delete the ...

HELP: Outlook downloads 3,4, now 5 copies of each email
I make Outlook 2000 use a Outlook.pst file on a separate hard disk instead of the usual C:\Documents & Settings\ folder. Everything is fine. I also TICK "Leave copy of message on server" so I always have a backup copy. Now when i format my PC and reinstall Windows & Outlook, I point to my D:\Outlook.pst and it starts using it. Then all of a sudden it starts downloading ALL my emails again. If I format my PC once again and reinstall Windows & Outlook, then Outlook starts downloading ALL my emails TWICE (there's 2 copies of each email downloaded, plus the copy I...

header full line but page 2 rows
Hi I like to design a report header and page over the full width of A4 paper. But all the data in 2 coloums. On Wed, 24 Feb 2010 15:45:01 -0800, Bruno wrote: > Hi > I like to design a report header and page over the full width of A4 paper. > But all the data in 2 coloums. Create a report the full width of the paper. Click on File + Page Setup + Columns Set the number of columns to 2 Uncheck the "same as detail" check box Enter the width of the columns wanted. Select "Down then Across" or "Across then Down", as wanted. -- Fred...

copy formatting?
Is there a way to copy and paste from a formatted set of cells, to an unformatted set and have the formatting copy/paste as well, so that column/row sizes adjust to be the same? Thanks Steven Shelton "Those who hammer their guns into plows will plow for those who do not!" --Thomas Jefferson Hi Steven With pastespecial you can also copy column width but not row height See the edit menu for PasteSpecial If you only want to copy a range to another place to view/print then you can try this Row and column width is working then http://www.rondebruin.nl/print.htm#n...

Macro runs fine from VBEditor, but not button
Hi, this macro was running fine, until the conversion to Office 2007. In the Locations worksheet I have a list of locations in Zone 1. A worksheet is created for each store in Zone 1. I manually move the created worksheets into another Book. Then I go back to the original file to run Zone 2. Only now I'm getting an error: Cannot run the macro 'Book 2.xlsx'!PrepareReport'. The macro may not be available in this workbook. Why is it looking to the new book for the macro? The macro is in the original file. It does let me click on the Developer tab, Macros...

Macro to Refresh External data
Good afternoon, I try to record a macro to refresh external data but the macro recorder does not give me anything once I refresh the query and stop the recording. Does anyone knows why? Or better if you know the VBA to make this happen -even when the data sheet is hidden- let me know. Thanks in advance and greetings from south Fla. Apprentice, This is the code the recorder generated when I tried a refresh on a text file import. Range("A1").Select Selection.QueryTable.Refresh BackgroundQuery:=False You'd probably change it to something like: Range("A1&quo...

Enable/Disable Macro Pop-Up
In the older version of Office when you opened an excel or other office document that had a macro in it - you would get a pop up and the opportunity to enable or disable it. Is there a way to get that same pop-up in 2007? See Help, macro setting Change macro security settings in Excel juamig wrote: > In the older version of Office when you opened an excel or other office > document that had a macro in it - you would get a pop up and the opportunity > to enable or disable it. Is there a way to get that same pop-up in 2007? > Right, someone else told me the...

Assign a macro to Command Button Object
When I right click on my command Button to locate the option of assign to macro its not their. How do I get the option to assign to macro to appear? The other options are available to me on the command button but not the assign to macro??? -- thanks, mc Hi Dallin, If the button is from the Control Toolbox, double-click the button which will take you to the sheet module and provide you with a macro stub for the CommandButton something like: Private Sub CommandButton1_Click() End Sub Insert insert the body of your macro between the two stub lines. Alternatively, if the macro you ...

how to copy conmanclient.exe and related files to the windows folder of device
I need to debug a winCE application over the ethernet using Visual Studio. I have connected to the device over the ethernet and now need to run conmanclient2.exe and cmaccept.exe before I can start debugging. However, I don't know how to copy these files over the ethernet. Please guide me. Thankyou! -- Message posted via http://www.pocketpcjunkies.com Remote File Viewer (Visual Studio Remote Tools from your start menu) -- Luca Calligaris (MVP-Windows Embedded) lucaDOTcalligarisATeurotechDOTcom www.eurotech.com "amephraim via PocketPCJunkies.com" <u583...

Macro to close excel #2
I have been using the ActiveWorkbook.save ActiveWorkbook.Close (False) commands to first ensure the spreadsheet saves and then closes. Th problem I am having is that this leaves Excel open. With spreadsheets running daily each using this .Close command, I end u with an awful lot of open excel windows. I use Scheduler in conjunction with the Auto_Open macro to activate th spreadsheets to run automatically. I have tried to use the 'Stop th task if it runs for - 59 minutes' setting but this doesn't get rid o Excel off the screen either but appears to just generate a Dr Wats...

Excel 2007 Macro Recorder not recording shapes
Hello, I am trying to figure out why my Excel macro recorder is not recording creation of any shapes or changes to existing shapes. I started the macro, and drew a rectangle and stopped it. This is all the code I get. I like to see the syntax for shapes and I am unable to see maybe there is some problem with macro recorder. Please help! Thanks! Sub Macro1() ' ' Macro3 Macro ' ' ActiveWindow.SmallScroll Down:=25 End Sub Regards, Jaan On Feb 14, 2:35=A0pm, jaanbazz <jaanb...@domain-xyz.in> wrote: > Hello, > I am trying to figure out why...

Need help in data copying. #3
Thanks Mr. Dave. It was really helpful Regards Tom -- SMIL ----------------------------------------------------------------------- SMILE's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=488 View this thread: http://www.excelforum.com/showthread.php?threadid=25956 ...

Typing in multiple row in a single cell
Is there a way to divide a cell in multiple rows? I am not talking about the insert the Text Box or table. The cell it self should be able to take text in multiple rows. for example to type "My address My Street My City" Three rows in one cell Khusro Hi Format>Cells>Alignment>Wrap text Then press Alt+Enter at each point you want to create a new row. As an aside, entering data in this format is not the most useful way to store data. Very often, you want to pull out the City separate form other things, for example. It would be better to store your data in separate ce...

Extract Final Row Mulitple Excel Files into Combined Workbook
Hi, Not sure if anyone can help on this, but I am completely struggling with VBA and have been looking through threads to try and find a solution. I'm trying to open multiple excel files by looking at a specific directiry file and then locate the final row and extract the data into one spreadsheet. I think I've managed to produce a VBA to look at multiple files but the rest.......help ! Can anyone help? Regards, Paul Holmes range("A65536").end(xlup).entirerow.copy destination:= activeworkbook.close get the next workbook "londonpaul" <paul.holmes@scottwilso...

TRACE macro not working.
Hi - I am very new to Visual C++ and MFC, so please bear with me. I am using VStudio.NET 2002, and am learning how to write Windows programs with C++, having had a lot of VB experience. I am having problems getting my CView derivation to show graphics functions, and I have been putting TRACE statements in the code to see what's going on. I know they must be executed because MessageBox() appears on cue. I am using the Debug configuration, and as far as I know I haven't changed any defaults. However, nothing is appearing in the Output Window. Any ideas? Thanks, -- Mark Bertensha...

Copying portions of data
Is it possible to select a specific area of the worksheet using a find command (the data changes every day) and copy just that portion onto a new worksheet? Thanks Wendy Hi Wendy, If a verbal rule (or rules) can be devised to locate the area, then it is very likely that someone could aaist you with code to automate this. --- Regards, Norman "Wendy Clarkson" <wenan@hotmail.com> wrote in message news:cs835v$6ag$1@hercules.btinternet.com... > Is it possible to select a specific area of the worksheet using a find > command (the data changes every day) and copy ju...

how do I copy only the contents of an email to word doc file
I'm trying to copy only the contents of an email to a word document file and the entire of the outlook page gets copied, how do I copy only the contents. I'm on XP windows On Wed, 25 May 2005 02:31:03 -1000, Angelina <Angelina@discussions.microsoft.com> wrote: > I'm trying to copy only the contents of an email to a word document file > and > the entire of the outlook page gets copied, how do I copy only the > contents. > I'm on XP windows Select the contents, click copy. Go to Word, click Paste. No? -- -Ben- Ben M. Schorr, MVP-OneNote/Outlook...