|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
text justification in excelI am creating an excel spreadsheet from vb.net 2005. I followed the
advice of some other posts on how to "Center Text in Excel" by creating a macro in excel to do what I want and then looking at the code. "oSheet.Range("F3").HorizontalAlignment = xlRight" is what was posted there. When I try this, I get an error of "xlRight is not declared" What do I declare it as? Thanks krollenhagen wrote:
> I am creating an excel spreadsheet from vb.net 2005. I followed the Look at what type of object HorizonatlAligment expects. It will be > advice of some other posts on how to "Center Text in Excel" by creating > a macro in excel to do what I want and then looking at the code. > > "oSheet.Range("F3").HorizontalAlignment = xlRight" is what was posted > there. When I try this, I get an error of "xlRight is not declared" > > What do I declare it as? > > Thanks > something system.something.horizontalAligment.xlright chris It works as an integer. Center is 3, Right is 4
Thanks. Chris wrote: Show quoteHide quote > krollenhagen wrote: > > I am creating an excel spreadsheet from vb.net 2005. I followed the > > advice of some other posts on how to "Center Text in Excel" by creating > > a macro in excel to do what I want and then looking at the code. > > > > "oSheet.Range("F3").HorizontalAlignment = xlRight" is what was posted > > there. When I try this, I get an error of "xlRight is not declared" > > > > What do I declare it as? > > > > Thanks > > > > Look at what type of object HorizonatlAligment expects. It will be > something system.something.horizontalAligment.xlright > chris Is there a way to get vb to recognize the xlLeft, xlRight, xlCenter,
etc.. names instead of having to figure out what the corresponding integer is? I am having trouble getting the borders to work properly. There are a lot more options than left, center and right in the borders to guess which integer corresponds to a given style, color, weight, etc... Thank you,
sql server 2005 tools configuration starts when I build a distribution project (VB 2005)
for next problem refresh performance in datagrid - big problem Outlook Add In suddenly stops loading ComponentOne : Extract to RTF problem Referring form objects in VB 2005. TypeForwardedToApp attribute. Replacement for Inet Control DLL Callback access mp3 header |
|||||||||||||||||||||||