Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
xlSheet is, I assume, a sheet that is in your automated Excel session xlApp.
But when you use 'Selection' without specifying anything different, as you do in the code, you are referring to the Selection property of the Excel session that is running the code, not the session being automated, and I suspect this is not what you intend and is what is causing the problem. To fix, use xlApp.Selection wherever you have selection. HTH! "Geoff" wrote: I have built that creates a worksheet and everything works perfect except when I try to select the cells and change the font to Microsoft San Serif-8. I get the error message "The Remote Server Machine does not exist or is unavailable" My code is as follows: xlSheet.Range("A1").Select xlSheet.Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select With Selection.Font .NAME = "Microsoft Sans Serif" .Size = 8 End With xlApp.Application.Visible = True Any suggestions are greatly appreciated! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I'm unable to change font size on a excell sheet | Excel Worksheet Functions | |||
Can one change the font or format of a sheet name? | Excel Discussion (Misc queries) | |||
Unable to Set Underline Property of Font Class | Excel Programming | |||
Unable to set Bold property of the Font Class | Excel Programming | |||
unable to set the colorindex property of the font class | Excel Programming |