Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Creating a excel workbook in memory

Posted on 2004-09-01
Last Modified: 2010-05-02

Does anyone know how to create a workbook in memory for VBA?  Basically, I want populate a feed of data onto an excel workbook.  

Question by:shellyp
  • 2
LVL 26

Expert Comment

ID: 11958520
can you just use automation?

Expert Comment

ID: 11959503

dim xlwb as workbook
dim xlwsh as worksheet

set xlwsh =application.workbooks.add
set xlwsh=xlwb.worksheets.add

'then populate data into xlwsh

Accepted Solution

ChenChen earned 500 total points
ID: 11959519
Hi Shelly,

Had a mistake in my previous comment,

it should be :

set xlwb=application.workbooks.add


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

789 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