Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Linking Powerpoint With Excel With Moving Files


Hi,

Im trying to create a powerpoint presentation that links to an excel file. Currently my macro works with the syntax:

Set xlWrkBook = xlApp.Workbooks.Open("H:Officeook2")

as my Powerpoint presentation is also saved in the H:Office folder.

I would like to somehow set the file destination in such a way that these 2 files can be linked even if I move them, but as long as they stay in the same folder. Such that if I moved this "Office" folder to my C: drive, I wouldnt have to change any code.

Any help would be greatly appreciated. Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Linking Excel Files To VB
I'm working on a project for school and I need help! I'm trying to write a program that uses (preferably downloads) data from an Excel spreadsheet. I don't want the user to view the actual spreadsheet, I am only wanting some of the calculations to be seen. I am also wanting a graph showing the cost differences, from the data. Please Help!!

Linking Excel Files Into Access Db Using VB Code
Hi
Could do with some help on this one ! I am sure this is very easy but I am having problems.

Basically this is what I am trying to achive:
Once a month I want to import or link to an excel spread sheet into Access. I also want to create an accumalative table for the excel spread sheets. ie This month I will import / link Januarys ss , I want to have the jan ss as a table but also want to add Jan to Dec figures in an accumalative table. So each month I can work with two tables , the table of which ever month it is and also the previous months table.
The two tables will be called AccumTime and GStime12-00 ( This months linked excel sheet will be GStime01-01 and so on.. ) the AccumTime table will always remain the same title. The AccumTime should be a table while the monthly spreadsheet should be linked.

I am trying to create an import / link button that will allow me to link the current months excel ss into the access enviroment. Then add this months data to the AccumTime table. This is the code that I have been trying to make work to allow me to link the excel data in:




Set xlsdatabase = OpenDatabase("d:paul_samsonpqrdatabase.mdb", dbOpenDynaset)
Set tdf = xlsdatabase.CreateTableDef("Accumtime")
tdf.Connect = "Excel97;database=c:paul_samson;"
tdf.SourceTableName = "GStime12-00.xls"
xlsdatabase.TableDefs.Delete ("Accumtime")
xlsdatabase.TableDefs.Append tdf

I just get the message "couldn't find instalable ISAM" and my accumtime table is deleted.

Can anyone tell me what I am doing wrong or help at all ?
or am I going about this in the wrong way. The reason I am creating this import button is because the name of the excel sheet will be slightly different each month so I was going to make the name up in a variable by extracting the month from windows.

Moving Files In Excel
I am setting up a workbook to compile workbooks with the same data format. I have it reading a directory, allowing the user to select one or more files and then running a loop to put the data where I want it. At the end of the loop, I would like to move the file into a different directory to signify that it has already been compiled. I see the MoveFile method, but I do not know how to specify the FileSystemObject it requires. Can someone help me with this? Thank you.



Edited by - iXer on 3/29/2003 7:49:58 AM

Linking Macros To Shapes In Powerpoint
Hi. I'm trying to build an interactive org chart in Powerpoint, and am looking for an elegant solution to my shapes/macros problem.

When my code is run, it draws a central circle, then a number of smaller circles around it, spaced evenly apart, and at an even distance from the central circle.

I give each of these smaller circles a name (SmallCircle 1, SmallCircle 2, etc, etc)

I've then linked each of these smaller circles to a macro, by adjusting the ActionSettings for each circle.

Now, here's my problem. All of the circles are linked to the same macro, so they all do exactly the same thing, no matter which circle you click on. (At the moment, the macro just draws a star in the corner of the presentation... not that that's relevant...)

I want each circle to do something slightly different when clicked on. Is it possible to send a variable to the macro to let it know which circle was clicked on?

The inelegant solution I could build would be to assign a different macro to each of the smaller circles. If there's no elegant way, that's what I'll end up doing.

Visual Basic 6 Linking With PowerPoint
Hi, i'm expereinceing problems trying to open up a powerpoint presentation with my vb program. I've made a combo box and a command button such that the program will read its value when clicked upon.It then runs a sub program to retrieve the powerpoint. Currently, the presentation did pop up, but only in the minimized mode. Any ideas on how to get it running on the main screen? Or even better start the power point show.

Private Sub heat()

Dim oPPTApp As PowerPoint.Application
Dim oPPTPres As PowerPoint.Presentation
Dim sPresentationFile As String

sPresentationFile = "S.ppt"


Set oPPTApp = New PowerPoint.Application

oPPTApp.Visible = True


Set oPPTPres = oPPTApp.Presentations.Open(sPresentationFile)



End Sub

Merging/Importing Word, Excel, Powerpoint And Visio Files Into A Word Document
Does anyone know how to do this or know of a website that has source code that does this? I can't find anything anywhere.

Each Page/Worksheet/Slide goes on a seperate page. Print formatting is retained (landscape/portrait) and if the imported Page/Worksheet/Slide is larger than the page im merging/importing to, it should auto-resize to fit the page.

Thx.

Merging Word, Excel, Powerpoint And Visio Files Into A Word Document
Does anyone know how to do this or know of a website that has source code that does this? I can't find anything anywhere.

Thx.

I posted this in VB General but then i saw this forum so I wasn't sure where it belonged and posted in both. Reply to either one.

Excel 2000, Create Powerpoint Org Chart From Excel.
I want to create a powerpoint org chart from Excel using information held in Excel. I have found how to add an Org chart into Powerpoint but can't find anywhere that tells you how to change the details/options or add Subordinates Managers etc and alter those details.

Anyone have any ideas (I don't want to create seperate text boxes if possible.)

Ps if you can create a good powerpoint org chart from excel, any ideas on the best layout of information in the spreadsheet to work through and create it.

This is one of those, that would be good if you can do it (created them in the past and are time consuming pains), rather than has to be done last week ideas.

Regards.

rob.

Print PowerPoint Files
I'm trying to print multiple PowerPoint files from a list but can't seem to do it without opening multiple instances of PowerPointas when I try to close the application down after each print it does so before it has finsished spooling the file to the printer and never gets past the first one.

Can someone tell me how to ensure than the program waits until the file has been spooled before closing?

Here's the code I've written which references a text file (attached)to get the files to be printed.

Code:

Private Sub cmdPrint_Click()
      
   Dim file_name As String
   Dim txtStream As TextStream
   Dim fso As New FileSystemObject
   
   Dim ppApp As PowerPoint.Application
   Dim ppPres As PowerPoint.Presentation
   
   'Open list of files to be printed
   Set txtStream = fso.GetFile(print_folder & "ada_sample.txt").OpenAsTextStream
   
   'Loop until all files printed
   Do
      'Read file name
      file_name = txtStream.ReadLine
      
      'Open PowerPoint
      Set ppApp = CreateObject("PowerPoint.Application")
      ppApp.Visible = msoCTrue
      
      'Open presenation file
      Set ppPres = ppApp.Presentations.Open(print_folder & file_name)
      
      'Set to print notes pages
      ppApp.ActivePresentation.PrintOptions.OutputType = ppPrintOutputNotesPages
      
      'Set number of copies
      Printer.Copies = 1
      
      'Send to Printer
      ppPres.PrintOut
      
      'Close Powerpoint
      ppApp.Quit
      
   Loop While (txtStream.AtEndOfStream = False)
   
End Sub




Thanks

Alex

Linking Files... 0_o?
Hi,

I have opened one file (full of company names) <--[random file]... as #1
My program then adds the company names to a combo box.

Now what I need to do is, when a company is selected in a combo box I want to open another file (containing all the info on the company) as #2

How can I link em up so... If.. 'say 3com is selected' then a list box will display its phone number, etc

Thanks in advance... Been thinking about this for a long time.. still Got no Clue

Linking Dll Files
Hi I was wondering Is there anyway to statically link the dlls that you use to make your program or would they all have to be installed with your program.. and if they have to be installed with your program does anyone know of a simple installation program builder

Linking To Outside Files
When you place a pictyure within the form and maybe use a load picture command with a button. How do you make sure that once the program is packed up and burned to cd that the files can be used on the other pc cos when you use loadpicture , you are creating a link to a file on your own system. I also have the same problem with a database file. If the program is created and installed it is infact locating the database on the system but if it were to be used elsewhere then it would be useless. I also want to update the database on other systems

I know this has technically got two questions here.

Please help.

Linking Files?
Hello, i have a question. Is there a way to link a text file to a picture file when you click a save commandbutton. Then when you open one, in the program, the opens as well? Just ask if you need more details or something.

Linking Files To Your App
Hey VbCity... was curious how you could do the follow...

a) Setup (I assume in the registry) that lets say .SID files are assiciated with my app. So when you appempt to open a .SID file... it not only realisez that "Oh thats a .SID for for Sidious application so I should open his app to view it" but also make it realize that windows has called the app to open this file.. so it actually opens the file on form load. Because its a pain in the butt if you double click the .SID file.. Sidious' App opens... and then you gotta go File > Open again to open the file.

b) Associating an ICON to the .SID file.. so its not just some windows icon because its not a recognized file?

Thanks guys, i know someone out there can help me!

Replace Text In PowerPoint Files
Hi All,
I have been stuck with my summer project which seems to be the most difficult job that I have ever done.

My project is a VB Macro built into a MS PowerPoint file which aims at helping automate MS PowerPoint.

This macro will be more or less similar to the standard functionality available in MS PowerPoint (activated by pressing Ctrl+H), using which you can Search for a term in a ppt file and replace it with any other term.

This macro would make it possible to make multiple such term changes across multiple ppt files. I have been able to write some VB code for the purpose. The code which does the replacements is as given below:

For Each oPres In Application.Presentations
For Each oSld In oPres.Slides
For Each oShp In oSld.Shapes
If oShp.HasTextFrame Then
If oShp.TextFrame.HasText Then
Set oTxtRng = oShp.TextFrame.TextRange
Set oTmpRng = oTxtRng.Replace(FindWhat:=listChangeFrom.List(j), _
Replacewhat:=ListChangeTo.List(j), MatchCase:=Match_Case.Value, _
WholeWords:=Whole_Word.Value)
Do While Not oTmpRng Is Nothing
Set oTxtRng = oTxtRng.Characters(oTmpRng.Start + oTmpRng.Length, _
oTxtRng.Length)
Set oTmpRng = oTxtRng.Replace(FindWhat:=listChangeFrom.List(j), _
Replacewhat:=ListChangeTo.List(j), MatchCase:=Match_Case.Value, _
WholeWords:=Whole_Word.Value)
Loop
End If
End If

Next oShp
Next oSld
Next oPres


However I am facing a lot of problems in the code. The text is replaced in only some sections of the document while some other sections tend to remain the same and you have to use the standard PowerPoint functionality to make those channges. The changes are not done on the following:
a) Grouped Textboxes,
b) Grouped Autoshapes
c) Inserted Tables
d) Embedded MS Office Files

Sadly, Microsoft's MSDN site does not have any information on such issues. I wonder why PowerPoint is the most ignored issues on the Microsoft site.

I would be extremely thankful to someone who can help me modify this code in order to remove even some of the bugs as stated above or can even give me some directions on solving these.
Thanks in advance,
Lonely

Create Powerpoint Presentation For .jpg Files In A Dir
Please help me.

How can I make a powerpoint presentation file using VB ? I have some .jpg files in a dir and want to create a powerpoint presentation file .ppt file using the vb code. Pls reply with a code.

Updating Files Linking Them?
Hi there! I want to make a file of a list clients looking for sessions at a gym that can be updated. I also want to make a client waiting list file that will be searched and any sessions that have been requested are automatically allocated if they become available I know how to make the basic first file but I have no idea how to link the waiting list file so that it will search the other file for free sessions.

The first list could be printed in notepad thus

Johnny Muscles, 1, 3, 10

And the same with the waiting list

There are 10 available sessions at the gym and when 20 people have booked up then that session is full. This is where my brain explodes I'm trying to work out the logic for a simple equation that will deduct the appropriate sessions but only if all 3 sessions the client wishes for are available. Otherwise they remain on the waiting list. The 10 sessions are represented by check boxes. Oh no it gets worse just thinking about it! So if I have 10 variables representing the sessions I'm thinking an equation could be

if a or b or c (+ available places) > 20 then "Error" Else
"Success"
open file for appending
endif

Oh wow you can tell I'm a real beginner here
Any ideas would be greatly appreciatted

Excel To Powerpoint
I'm trying to take Excel data and put it into a powerpoint chart(graph) datasheet slide? How do I do this

For example: I want to take a list of numbers in excel spreadsheet and one by one put those values in a bar graph in a powerpoint slide. I want to put those values in a powerpoint datasheet. From those values you get a nice bar graph.

Thanks

Powerpoint In Excel
Does anyone know if it's possible, using VB, to display a powerpoint presentation within Excel - ideally within a user form. Can't seem to insert it within the form.

Alternatively, displaying it somewhere within the current WSheet would also be as useful.

Thanks
Chris

Powerpoint PPs From Excel ????
I need to open a powerpint pps file from an application in Excel, I tried using the following:

Dim ppApp As PowerPoint.Application
Dim prsPres As PowerPoint.Presentation

Set ppApp = New PowerPoint.Application
Set prsPres = ppApp.Presentations.Open(ActiveWorkbook.Path & "Distingos.pps")

But, then I realize that this code works only with Office XP, because the Office that we use is 2000 and an error is diplayed:

Compile Error

User Defined type not defined

I need help, does anybody knows how to make it work?, did I need a class module?

Excel/Powerpoint
Hi

I'm making a VBA thing which is supposed to:

paste data from several Excel workboooks into one central workbook with about 70 worksheets.

Each sheet contains an embedded graph which is linked to the pasted data.

That's the easy bit.

What I need to do now is to copy each of the graphs into a Powerpoint presentation, one graph per slide.

So,I've got code that in Excel goes to sheet 1, copies the graph, starts a new Powerpoint session, opens the PPT, goes to the correct slide, pastes the graph, then saves and closes Powerpoint, leaving Excel as the active window. Then the next sheet is selected and the process is repeated What I want to be able to do is to return to Excel, go to the next sheet etc, without having to close Powerpoint after each paste.

Can anyone advise?

Thanx

Excel To Powerpoint
Greetings y'all
Does anyone know of a way to update a chart and install it on a powerpoint slide programmatically?
I have created the charts, but the data (which comes form an external source) must be updated often. No problems there wrote code to get that done. Maybe not the most efficient code, but it works. Once the data is updated on the charts I need to be able to update the Powerpoint slide.
The big issue is the charts are one time things and the same spreadsheet is used to create all the new charts.
Would a work-around for that be creating a "buffer" spreadsheet and updating the data there. From there if the chart were linked into Powerpoint you could just refresh with the new data.
If that is the case, all I have to do is reference the buffer worksheet, findo out if the chart name exists already and overwrite or create. Then refresh or create Powerpoint slide.
Confused yet? The above brings me to my next question: Can you update a workbook even though it is not openned? If so how?
I appreciate any crazy ideas that may help.

Excel-powerpoint
Is it possible to open a powerpoint show/presentation from excel?
I want to be able to open the show as part of a help file, if the user presses a button.

MS Excel -&gt; MS PowerPoint?
I've been trying to open a ppt file from Excel with little luck, too many error msgs! Is it possible or is it quicker and easier to go through MS Access.

I've been using code similar to:-

Dim channelNumber As Integer
channelNumber = Application.DDEInitiate("powerpnt", "H:homepowerpointpptTest1.ppt")


But it produces a type mismatch error and then a run-time error - object-defined error

Cheers
Fossil

Driving PowerPoint From Within Excel Using Excel VBA.
Hi Everybody

As we all know that we can drive one MS Office application from another, for example we can drive MS Access from within MS Excel and vice versa, what I want to know is that is it possible to drive MS PowerPoint from within Excel using Excel VBA?

I want to be able to insert graphs as pictures in to PowerPoint presentations from MS Excel (the graphs actually get created in an Excel spreadsheet and needs to be brought in to PowerPoint for a presentation - there are about 150+ of these pictures and this process needs to be repeated every month).

So I was wondering if I could automate the process of bringing in these pictures from Excel in to Powerpoint using VBA. If yes,, that would save us a lot of time and effort.

Can someone point me to wherever I can find some information to drive PowerPoint from within Excel using Excel VBA to carry out the above task?


Best regards


Deepak Agarwal

How To Display Powerpoint Files Or To Make It Work In My App.?
how to display powerpoint files or to make it work in my app.?

Opening Powerpoint Show Files In The Vb Form
Dear friends,
i want to show the powerpoint shoe files in my vb form.how i can do this.plz help me.
thanks,
indra

Linking Random Access Files
Hi.
Problem with linking Random access files. I have a payment form which needs to take some info from two different files on different forms to calculate an invoice. Can anyone give me the right code to link this. My payment form has 2 cbo's 1 for the patientsFile and 1 for the TreatmentFile with txt boxes to display the info.
The first two forms work well Its just that I don't know how to get this into my cbos on the payment form. Code for both forms are similar so I've shown the PatientsFile here.
Code for PatientsFile
Option Explicit
Dim FilePatient As String
Dim NumberOfRecords As Integer

Private Sub cmdAddNow_Click(Index As Integer)
Dim Patient As OnePatient
Dim Spaces As String
Dim PatientNo As Integer
Dim DataToDisplay As String
FilePatient = App.Path & "Patients.txt"
Spaces = " "
Patient.PatientNo = Val(txtPatientNo)
Patient.Surname = txtSurname
Patient.Forename = txtForename
Patient.Address = txtAddress
Patient.DOB = TxtDOB
Patient.MedNo = txtMedNo
Patient.TreatmentStart = Now
DataToDisplay = Patient.PatientNo & Spaces _
& Patient.Forename & Spaces _
& Patient.Surname & Spaces _
& Patient.DOB & Spaces _
& Patient.MedNo & Spaces _
& Patient.TreatmentStart
lstPatients.AddItem DataToDisplay
Open FilePatient For Random As #1 Len = Len(Patient)
Put #1, NumberOfRecords + 1, Patient
Close #1
NumberOfRecords = NumberOfRecords + 1
Call ClearNew
fraNew.Visible = False
End Sub

Private Sub cmdBack_Click(Index As Integer)
ClearNew
fraNew.Visible = False
fraOptions.Visible = True
End Sub

Private Sub cmdMenu_Click()
frmMenu.Show
frmPDetails.Visible = False
End Sub

Private Sub cmdNew_Click()
Dim newnum As Integer
fraNew.Visible = True
txtPatientNo = GetNNum(newnum)
End Sub

Private Sub Form_Load()
Dim Index As Integer
Dim DataToDisplay As String
Dim PatientNo As Integer
Dim Surname As String * 12
Dim Forename As String * 10
Dim Address As String * 25
Dim MedNo As String * 7
Dim DOB As Date
Dim TreatmentStart As Date
Dim Patient As OnePatient
Dim Spaces As String

FilePatient = App.Path & "Patients.txt"
Spaces = " "
lstPatients.Clear
Open FilePatient For Random As #1 Len = Len(Patient)
NumberOfRecords = LOF(1) / Len(Patient)
If NumberOfRecords <> 0 Then
For Index = 1 To NumberOfRecords
Get #1, , Patient
PatientNo = Patient.PatientNo
Surname = Patient.Surname
Forename = Patient.Forename
Address = Patient.Address
DOB = Patient.DOB
MedNo = Patient.MedNo
TreatmentStart = Patient.TreatmentStart
DataToDisplay = Patient.PatientNo & Spaces _
& Patient.Surname & Spaces _
& Patient.Forename & Spaces _
& Patient.DOB & Spaces _
& Patient.MedNo & Spaces _
& Patient.TreatmentStart

lstPatients.AddItem DataToDisplay
Next Index
Else
MsgBox ("File empty at present")
End If
Close #1
End Sub

Public Sub ClearNew()
txtMedNo.Text = ""
txtSurname.Text = ""
txtForename.Text = ""
txtAddress.Text = ""
txtMedNo.Text = ""
TxtDOB = ""
End Sub

Public Function GetNNum(NewNo As Integer) As Integer
Dim Index As Integer
Dim ck As Integer
Dim Patient As OnePatient
ck = 1
Index = 0
FilePatient = App.Path & "patients.txt"
Open FilePatient For Random As #1 Len = Len(Patient)
Do While (Not EOF(1))
Index = Index + 1
Get #1, Index, Patient
If Patient.PatientNo > NewNo Then
NewNo = Patient.PatientNo
End If
Loop
Close #1
NewNo = NewNo + 1
GetNNum = NewNo
End


Thanks
Rosi

Trouble Linking Files With VBA And Access
Thanks to whomever may be able to help me with this problem.

I have one Master file in Access that has a field that is programmed to generate sequential numbers and is the key field in that file. It is not allowed to have duplicates but it is indexed. So each record in this key field may look like this:

1
2
3
4
5
etc.

I also have between 30 and 40 baby files that have nothing to do with each other so there is no need to link baby file to baby file.

However, I do need to link each baby file to the Master file by way of the key field in the Master file. So the records in a baby file may look like this:

1
1
2
3
3
3
4
4
5

It seems as though Access does not allow the programmer to link over say 32 files. After that, Access leaves the rest up to the programmer.

Is there anyone who may be able to help me out of this black hole? I would be ever so grateful

Pasting From Excel To Powerpoint
I want to copy an image from Excel and paste into a slide in Powerpoint. I can't seem to figure out how to do this. I then want to go back to Excel, copy some more information and paste this into the next slide and so on... any ideas please??? thanks

So to reiterate I need a macro created in Excel that runs code to copy something and paste into a given slide in Powerpoint.

Closing Powerpoint From Excel
Hi. I'm updating a PPT presentation using data in an Excel workbook (Office versions 2002). I'm manipulating the powerpoint objects (using an Excel Macro) that are set as:

set ppApp = new.powerpoint.application
ppApp.Presentations.Open (somefile)
Set ppPres = ppApp.ActivePresentation
....

After updating the presentation, I try to close the PPT application so that my Excel control sheet is once again visible:

ppPres.Close
ppApp.Quit
Set ppPres = Nothing
Set ppApp = Nothing

Unfortunately, this doesn't close the PPT window. The PPT window stays in place until I stop execution of the Excel macro. But I need to query the user (with the macro) before ending execution. How can I close the PPT window, or alternately, how can I get the Excel window back on top so that the user can see the msgbox info I'm trying to show them.

Anyone know the secret??
Thanks.
-em

Excel/Powerpoint Interaction
I am currently making changes to an app that I did NOT develop. It is a nightmare. So, I am trying to start everything from scratch. The application is a powerpoint slide show that grabs data from Excel. Simple enough. But, after looking into it, I get stuck.

I can get the data from Excel, but my data changes all the time, but the data in Powerpoint only remembers the data that was pasted into Powerpoint. How do I grab data from a Refreshed Excel spreadsheet??

I’m lost. Please help….

VB To To Open Powerpoint From Excel
Hello All,

New to the site and was hoping for some insight.

I am trying to several things in Excel

1. In Excel(XL), select a range and open a powerpoint(PP) template.
2. within PP, update currect object with the range from XL
3. save the PP based on a cell within XL

Don't know if it's possible or am I asking for too much.

Any help is much appreciated.

Powerpoint/Excel Communication Via VBA
I have a PP presentation with an Excel sheet (not linked) on the last slide. I want the pres and the sheet share data and affect each other.

1) How can I access data of the embedded excel sheet from a VBA script in the presentation?

2) How can I add a new row in the embedded excel sheet, everytime the user adds a new slide to the pres?

3) How can I restrict cell values in the embedded excel sheet to the number of slides in the presentation?

Thanks in advance.


Robert

Excel Object In Powerpoint
Hi,

I posted this in the incorrect forum, so im reposting it here...

I'm trying to select an Excel Object that is in PowerPoint and change one of the cells with Visual Basic (Macro).

I think this is how you select the object:
ActiveWindow.Selection.SlideRange.Shapes("Object 18").Select

And i think this is how you change the cell
 Range("B9").Select
    ActiveCell.FormulaR1C1 = "asdf"


I was thinking of using this code that I got from another post:

Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
' Create an instance of the object
Set xlApp = New Excel.Application
' This determines whether the application is shown or not
xlApp.Visible = False
' Open the appropriate workbook (i.e. XLS file)
Set xlWorkBook =
' Then open the appropriate worksheet
Set xlWorkSheet = xlWorkBook.Worksheets("Days of Care")

 Range("A1").Select
ActiveCell.FormulaR1C1 = "Test"


But I don't know what to set xlWorkBook to.


Any help would be appreciated!!

Thanks!

Excel Object In Powerpoint
Hi,

I'm trying to select an Excel Object that is in PowerPoint and change one of the cells with Visual Basic (Macro).

I think this is how you select the object:
ActiveWindow.Selection.SlideRange.Shapes("Object 18").Select

And i think this is how you change the cell
 Range("B9").Select
    ActiveCell.FormulaR1C1 = "asdf"

Any help would be appreciated!!

Thanks!



Edited by - Fudgenut on 8/12/2003 1:08:24 PM

Excel Powerpoint Automation
Hello everyone,
My final year project, is to create a "Project Mgmt Review" automation tool. Every month, the company I am working for asseses it's monthly performance's in the form of 14 spread sheets which it in turn incorporates into a 20 slide powerpoint. So at the end of every month, the values in the excel spreadsheet changes,which in turn has to be incorporated into the powerpoint PMR. Until I create, this software, At the end of every month , someone will have to manually cut,copy , paste and replace the old excel sheets in the PMR, with the new one. My project is to automate this entire process, with the click of a button.
I would have to generate a mechanism,whereby I can access the Excel spreadsheets using vb, an incorporate them into powerpoint. I would like you guys, to help me out whether , this can be done using API'S or using .ocx files. I would also like to know, if this project is feasible using powerpoint in the first place. If it's not too much of a hassle , I would like someone to start me off, by giving me the brief algorithm, and some introductory code.
Please guys, I am in dire straits, and as you would have figured out by now, My knowledge of Visual basic is rather limited. I have till the end of next month, to finish..so someone please help. Thank you.

Linking VB With EXCEL
Hi
I was just wondering how I would create a click event in VB that allows me to view an already saved EXCEL workbook?
Any other functions that link VB with EXCEL would be much appreciated - I basically have an EXCEL spreadsheet full of data that I would like to interogate using VB.

Cheers

Linking A Pgm To Excel Thru VBA
I am linking a pgm called Merlin to excel. Merlin controls test equipment. I read thru the samples and help files and I can get the status of the merlin pgm (such as test started, test ended, etc) thru a SUB called CONNECT. I call CONNECT through the MerlinAutomation library that is referenced in VBA.
The help file says that CONNECT's method's are to be put into a class that I put into my VBA pgm. An additional help file gave me the methods that I put in the class.
I created a class module called MerlinEvents that I put all the methods in. I then added the following line "Dim Started As New MerlinEvents".

Here's the problem: The Merlin help file states the CONNECT sub should look like this: MerlinAutomation.CONNECT("projectname.class")
When I type the projectname (VBAProject), the class name is not a member or method of the project. I tried just putting the class name in there (Started) and it says "object variable not set". I tried adding a method to Started (Started.TestStarted). The pgm does step into the class module, when TestStart finishes VBA says "activex component unable to create object".

Some additonal info:
Merlin Help file states that the project should be set up as a ActiveXEXE type and the class instancing to Multiuse.
I can't fing project type in VBA and the only class instancing for VBA are 1) Private and 2) PublicNotCreatable - I tried both.

Am I trying to do something where VBA is insufficient? Do I need an actual VB pgm (compilier)?

Linking To Excel
I can link to Excel workbooks on my local computer, but how can I link to specific open workbooks on the network?

pp

Linking Excel And VB
I have data (numbers in tabular form in an excel sheet. I want VBA to pick these numbers from Excel and use them as coefficients of an equation. This equation has to be displayed in a text file.
Example:
Data in Excel sheet:
2 5 6
3 6 9
4 9 7

To be displayed in equation form in the text file:
2a + 5b + 6c + 3d + 6e + 9f + 4g + 9h + 7i = Z

I would be greatful if somebody can write a code for this problem.
Thanks,
Jasdeep

Linking Of Excel To Vb6
I need help on how to link a drive to vb so that I can grab the data (excel format) from the drive to my vb programme. I will appreciate if anyone could provide me with the codings.

Linking To Excel
I'm new to VB...
I'm unable to run my macros which I've recorded in Excel. I've pasted the whole code under command_click but when I run it, it returns
Sub Macro1() not defined.
I have another problem, I dun know how to send data from VB text boxes to Excel cells

Any help is appreciated. Thanx.

Linking .obj Files From Different Programming Languages With VB Applications
Hi
I was reading a book on Masm32 and it said you can link obj files that masm produced in other programming languages.
I was wondering if I could link an obj file (specifically done by VC) and use a function that I wrote in VC with VB.
How would I link that obj file and how would I call the function (that I would later link from the obj file written in VC) in my VB application ?
Thanks

Linking/Storing Word Files As OLE Objects
Hi,

I'm about to embark on a project to create in-house copy-circulation software for a small college newspaper.

I'm looking for a way to either link or embed rich text into a database. The rich text that I'm looking to embed probably would never exceed 20,000 characters, so the memo type could provide the solution.

However, the ability to embed the files into an OLE Object field, and then to subsequently be able to export them into a word document would be invaluable for my project.

I've done some database programming in the past, but it was never very extensive, and I'm quite a bit rusty.

I'm also looking to learn how to interact with Adobe Indesign.

Thanks!

-- Yehuda Katz
Editor in Chief, Brooklyn College Excelsior

Linking C++ COFF OBJ Files In Visual Basic
Hey everyone, I've been recently struggling to find a solution to this problem.

Does anyone know if its possible to link a previously compiled C++ OBJ file along with Visual Basic OBJ files to produce an executable capable of utilizing procedures designed in C++?

I'm afraid I can't use a DLL, as the project must be stand-alone. However, would it be possible to configure the C++ functions defined within the OBJ file to be exported, so they could be called as regular APIs? Surely they'd have to be called dynamically with LoadLibrary and GetProcAddr, but that would hardly be an issue.

Any help and thoughts regarding this matter would be deeply appreciated.

Creating New Powerpoint Slide Using Excel?
ok.. Im trying to add a new slide to a presentation that has NO slides (from excel) using:


Code:
Set PPT = GetObject(, "PowerPoint.Application")
PPT.ActivePresentation.Slides.Add(1, ppLayoutTitle).SlideIndex

but it does not reconize ppLayoutTitle (SlideFormat). so I tried:


Code:
Set SlideType = PPT.Presentations.Sliderange.Slides(1).Layout
PPT.ActiveWindow.View.GotoSlide Index:=PPT.ActivePresentation.Slides.Add(Index:=1, Layout:=SlideType.ppLayoutTitle).SlideIndex

but no success. Any ideas??

Thanks, JEff

Automate Interface From Excel To Powerpoint
Greetings once again,
I have had extremely good luck getting answers from this forum, I would likt to thank all of the people who have helped and with that in mind I seek your assistance again.
I have created a spreadsheet that extracts, loads/refreshes data, sorts the data and creates pie charts based on the results. From teh direction I recieved from my bosses, I thought that was the end of it.
Well as luck would have it, the end result changed and while all of my works was worthwhile, they have changed the requirement for viewing. Now it must be able to be viewed in a powerpoint presentation.
I have tried linking the chart in the presentation, but the problem with that is, every chart updates everytime the spreadheet is updated. So if I run the sort through one set of data, link the chart then run another set of data, both charts update. I need each chart to stay static for each set of data.
I think the easiest thing to do would be to export as a picture and insert into the Powerpoint on the approriate slide in the correct position at the correct size.
Is there a way to do that progammatically, or is there a native function in Office 2000 that would allow me to do that? Any help would be greatly appreciated.

p.s. in a listbox with multiple columns howdo I reference the unbound column. If I want to use that value for something I have been binding that column then rebinding at the end of the macro to keep the value constant it works but just not as effiicient as it could be.

Slow Excel Automation From PowerPoint
Wonderful web site, hope one of you can help…

I have a VBA macro which operates on an existing excel workbook. In my application I would like to launch this macro from a PowerPoint macro since the resulting excel output provides content for a PowerPoint slide and the PowerPoint side already has VBA code associated with it. The problem is that, when I run the code as a PowerPoint macro referencing an Excel workbook object it runs 30 times slower than when I run the same macro under excel directly. I figured that this must be due to some sort of extreme overhead in referencing excel objects across applications and this does seem to be the case. The problem is that if I include the macros as part of the excel sheet which I reference the user is bothered by a bunch of warnings about opening a file containing macros. Any easy way around this?

Thanks
Paul Voith

Copyright © 2005-08 www.BigResource.com, All rights reserved