Thanks Nick. This works. This code opens an existing excel workbook, I now
how to create a new one, bu how do you place access an excel workbook that is
already open. I have tried set xlwb = activeworkbook and set xlws =
activeworksheet but I still get an error.
--
Jason V
"NickHK" wrote:
> Jason,
> Assuming Visio works similar to other VBA enabled app:
> -Set a reference the Excel type library.
> Dim XLApp As Excel.Application
> Dim XLWB As Excel.Workbook
>
> Set XLApp=New Excel.Application
> Set XLWB=XLApp.Workbook.Open("PathAndFileNameThatYouWant.xls")
>
> Msgbox "The shape name is: " & XLWB.Worksheets(1).Range("A1").Value
>
> Obviously change the worksheet and range to that required.
>
> NickHK
>
> "Jason V" <(E-Mail Removed)> wrote in message
> news:1375D94D-1B3C-4833-9325-(E-Mail Removed)...
> > I want to drop a shape on a visio drawing using vba in visio or excel. If
> I
> > use the macro in Visio I want to get the name of the shape to drop from a
> > cell on a worksheet or from a variable name in an excel macro. Can anyone
> > help? Thanks.
> > --
> > Jason V
>
>
>
|