Creating and pasting using VB

MS EXCEL

    Sponsored Links

    Next

  • 1. Auto update production sheet
    Helpp Please (Using Aug as an Ex).At the End of the month, we woud like to have a formula to replace the data of the corresponding month with updated data located on a seperate worksheet. Information must remain constant until end of month due to 12 month review cycle. Example: the end of this month, the information in A8 and B8 should be updated ( Changing the month (A8) , is not as significant as the data...but would be nice) with actual data located from a seperate production sheet. A B 1. Jan'07 95 2. Feb'07 94 3. Mar'07 93 4. April'07 96 5. May'07 97 6. June'07 92 7. July'07 91 8. Aug'06 92 9. Sept'06 90 10. Oct'06 99 11. Nov'06 93 12 Dec'06 90 Thanks for any assistance you can provide.
  • 2. Unhiding default menus and toolbars.
    Running XP, SP2, Excel 2003, SP2. I use Microsoft's Virtual Desktop Manager (MSVDM). If I have an Excel spreadsheet open in one window, switch to another window, then switch back, all of the default menus and toolbars have disappeared. I can't find any way to restore them. I've looked at all the keyboard shortcuts, and those that seem as if they might affect the menus don't seem to work. This can be extremely annoying. Can anyone tell me how to get the stuff back? Thanks, Sean.
  • 3. "is now available for editing" problem with Excel-automated mail merge
    I have an excel file template that automated to open from an Access application that will 1) save the template as a new file with the current date/time appended to the file name, 2) pull data from an Access database and format the data into a usable mail merge file, and 3) open the mail merge file in Word. This all works well only I have two problems with which I need some help. The first problem is how can I automate the mail merge file to open with the current Excel file as the datasource for the mail merge? Right now, I'm cutting and pasting the file path into Word myself. The second problem is that once the mail merge is done, I close the Word file and the Excel file. Then I get a message that the Excel file I just closed file "is now available for editing. Choose Read- Write to open it for editing." What can I do to prevent this? Here's the code that currently opens the Word document: Sub Create_Emails() Dim appWD As Object Dim stPath As String ActiveWorkbook.Save stPath = "X:\ProdMgt\RRAdmin\Request Proc\Entitlement and Increased Access Requests\Templates\Request Denied (EIA) TEMPLATE.doc" Set appWD = CreateObject("Word.Application") appWD.Visible = True appWD.Documents.Open (stPath) appWD.ActiveDocument.MailMerge.MainDocumentType = wdEMail Set appWD = Nothing End Sub
  • 4. Create a variable
    Dear all, In my VBA project I have a lot of codes... But I want that in one code create a variable to use in another code. For example: sub code_1() dim x as variant set x = 10 end sub sub code_2() for i = x .. .. .. end sub How can I do this? And what I need to do for update de variable? Thanks a lot!!! Andr

Creating and pasting using VB

Postby mewilh0 » Sun, 23 Apr 2006 09:15:59 GMT

I need to create an email and paste some data already selected in excel
into the body.  I have just started to attempt this so if I need to add
mapi or anything like that please let me know.  Any help would be very
helpful....

Thanks,

Matt


Re: Creating and pasting using VB

Postby Otto Moehrbach » Mon, 24 Apr 2006 01:43:14 GMT

If you copy straight from an Excel sheet to an email, you will be pasting an 
object and that can be a nuisance, particularly if you need to edit the 
contents before sending it.  I simply paste it to Word first, then copy it 
from Word into the email.  This may not suit your needs though.  HTH   Otto







Re: Creating and pasting using VB

Postby Matt » Mon, 24 Apr 2006 12:17:42 GMT

Thanks for the quick response but I should not have to edit the object
once it is in the email.  Any ideas on how to create an email and paste
an object from excel into the body?


Re: Creating and pasting using VB

Postby Otto Moehrbach » Tue, 25 Apr 2006 07:45:15 GMT

I have done it many times with just copy/paste.  But I was copying cells 
only.  Otto







Re: Creating and pasting using VB

Postby Matt » Tue, 25 Apr 2006 10:08:28 GMT

i just have a selection of cells (i.e. a1:f28) but i can't find the
code to create an email and paste the selected data into the body....
if you could help that would be great


Re: Creating and pasting using VB

Postby Otto Moehrbach » Tue, 25 Apr 2006 23:01:52 GMT

Matt
    I must be misunderstanding you and what you want to do.  I just created 
a new email to myself,  I opened an Excel file.  I copied a group of cells. 
I went to the email message and pasted into the body of the message.  I then 
sent the message.
    I received the message and there was the group of cells.   HTH   Otto







Re: Creating and pasting using VB

Postby aidan.heritage » Tue, 25 Apr 2006 23:17:33 GMT

The missing part of this question is what email program?  Assuming
outlook, then it will be possible to do it - in essence, you would
create a new mail item, then set the body to be the range you want.


Re: Creating and pasting using VB

Postby Matt » Wed, 26 Apr 2006 02:27:15 GMT

I apologize.  Yes, I am using outlook but everytime I try to create a
new email using vb i get errors.  Do I need to include references to
another library or something?


Re: Creating and pasting using VB

Postby aidan.heritage » Thu, 27 Apr 2006 02:05:02 GMT

My email is  XXXX@XXXXX.COM  - if you email me we can perhaps
take this offline, but it can be done (the outlook model is a pain to
program, but it's do-able!)


Re: Creating and pasting using VB

Postby aidan.heritage » Fri, 28 Apr 2006 23:20:23 GMT

Just in case the email doesn't arrive, this is to alert you to the fact
that I've replied via email (!)


Similar Threads:

1.Creating and pasting using VB

I need to create an email and paste a current selection in microsoft
excel using visual basic.  I have just started to work on this so I
don't know what all I have to include.  If I need mapi add-ins or
anything else added please let me know.  I already have the sub
routines set to copy the data that I need out of excel but now I need
to email this data automattically.  Any help would be very helpful.

Thanks,

Matt

2.how to copy/paste macro to a newly created file using vba

Hello,

I have a workbook with numbers of macros - one of it translate data
numbers into text "in words". I've created a function which after
fullfilling datasheet, is copying it into a new file. And now I have a
problem, because in a new workbook there is no macro and of course there
isn't my function, so the datasheet doesn't works good.
I don't want to copy this function manually - I'd like to make it more
automatic /during copying data into a new workbook/. Unfortunatelly I
don't know how to do it.
If somebody knows how to do it, Please - show me an example.

thx,
Maleo

3.how to paste macro to a newly created file using vba

Hello,

I have a workbook with numbers of macros - one of it translate data 
numbers into text "in words". I've created a function which after 
fullfilling datasheet, is copying it into a new file. And now I have a 
problem, because in a new workbook there is no macro and of course there 
isn't my function, so the datasheet doesn't works good.
I don't want to copy this function manually - I'd like to make it more 
automatic /during copying data into a new workbook/. Unfortunatelly I 
don't know how to do it.
If somebody knows how to do it, Please - show me an example.

thx,
Maleo

4.Change source for links created using Paste Link

Hi,

I am new to VBA Word Macros.
I need code sample to change the source file for the links created
using Paste Link.

I tried using Field.LinkFormat.SourceFullName = "New file name" but
this is throwing an exception "Access is denied"

Thanks,
VSP

5.Copy Paste Chart format in Excel 2003 using VB.NET

I have a template file in Excel which contains some sample charts. I need to 
generate some charts which has the same format as that of sample charts. I'm 
using VB.NET 2005.

6. copy and paste using vb code

7. copy and paste formula using vb code

8. How do I copy and paste a powerpoint slide from excel using vb



Return to MS EXCEL

 

Who is online

Users browsing this forum: No registered users and 13 guest