MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Making a Workbook as an Active Workbook without opening it

  Asked By: Emily    Date: Jan 06    Category: MS Office    Views: 1398

Can I have a Workbook as Active Workbook in an excel VBA application
without opening the concerned workbook itself?



6 Answers Found

Answer #1    Answered By: Benjamin Simpson     Answered On: Jan 06


Answer #2    Answered By: Adalwen Fischer     Answered On: Jan 06

But you can open it into an invisible instance of Excel, or you can hide to
Window also:

Application.Visible = False


Window.Hide = True

Answer #3    Answered By: Dylan Evans     Answered On: Jan 06

Or you can import the data in the Excel-file without opening  it:


Answer #4    Answered By: Kerry Wright     Answered On: Jan 06

Is there a macro I can copy to accomplish the following please?

Suppose this is in column A:
1> James Anderson
2> Jan 12, 1873
3> Aug 10, 1944
4> “Devoted Father”
5> William Brown
6> Feb 17, 1900
7> Jul 22, 1982
And so on…….

Ok, I highlight the first four options. Is there an easy macro to change
that to:
1 James Anderson Jan 12, 1873 Aug 10, 1944
“Devoted Father”

I.e., whatever I highlight is spread across ONE row? Right now, I tried a
macro, but it pastes in the wrong cell. Automating this would save about
nine days work. After I highlight the next three rows, it gets spread out
like this:
5 William Brown Feb 17,1900
Jul 22, 1982

I can do a sort later and remove the empty rows. Possible?

Answer #5    Answered By: Miriam Green     Answered On: Jan 06

This should be possible using "PasteSpecial transpose"

I do not have the time to test it right now.

Answer #6    Answered By: Alberta Miller     Answered On: Jan 06

Microsoft provides a excel  ODBC driver so you can access a workbook  via
VBA ADO code without opening  it.

See the following KB article detailing the process:


Didn't find what you were looking for? Find more on Making a Workbook as an Active Workbook without opening it Or get search suggestion and latest updates.