Solved

Using VB in powerpoint

Posted on 2001-06-18
1
226 Views
Last Modified: 2010-05-18
I need to (within code in a powerpoint VB module) reference cells in an excel file.

What is the code that i need to do this?
Thanks

JS
0
Comment
Question by:jordo2798
1 Comment
 
LVL 2

Accepted Solution

by:
chandukb earned 100 total points
ID: 6203496
Yes, you can read data from xl.

reference excel object library in your project

Dim xl As Excel.Application

   If xl Is Nothing Then
       Set xl = CreateObject("Excel.Application")
       xl.DisplayAlerts = False
   End If

   xl.Workbooks.Open "your file name"
   xl.DisplayAlerts = True
   yourVariable = xl.sheets("sheet name").range("your column, row).value
   msgbox yourVariable
   Set xl = Nothing

Chandu


0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question