|
-
Mar 1st, 2005, 11:37 AM
#1
Thread Starter
Member
vertical title in excel cells
I use the code, for example :
excelsheet.application.worksheets("myname').value="prod"
with excelsheet.application.worksheets("myname").range("A1")
.orientation=xlvertical
end with
and sometimes works : it gives p
r
o
d
and some others does nothing!!
I feel I need the value of the constant xlvertical, but don't know how to find it. Once I needed the value of xlup and you gave it to me : -4162
Furthermore what I really want is the result d
o
r
p
and the 4 lines nearer. Any help? Thanks
Last edited by Norah; Mar 3rd, 2005 at 02:53 PM.
Reason: RESOLVED
-
Mar 1st, 2005, 12:19 PM
#2
Re: vertical title in excel cells
Here is the value for the const. -
So your saying that you want to reverse the cell contents and make it verticle?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 1st, 2005, 03:31 PM
#3
Thread Starter
Member
rotated text in left side of cell in excel sheets
The following code works O.K. : the texts in cells are rotated 90 degres as I wanted. But they appear at the righ(the end) of the cell and I want them at the left(the beggining of the cell) :
with hoja.application.worksheets("produccion").range("A1:J1)
.orientation=90
end with
I tried various codes including "alignment" in diferent contexts, but all failed!! Please, any help? Thanks.
Last edited by Norah; Mar 2nd, 2005 at 08:34 AM.
Reason: RESOLVED
-
Mar 1st, 2005, 03:33 PM
#4
Re: rotated text in left side of cell in excel sheets
What is the column formatted as? Text or numbers. Also, check you alignment formatting on the column.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 1st, 2005, 04:04 PM
#5
Thread Starter
Member
rotated text in left side od cell in excel sheet
I want the rotated text in a row, namely, ("A1:J1") . The row is all text
Furthermore, I can do this in excel , directly by opening format, cells, alignment :90,alignment horizontal text: left, alignment vertical text: bottom. But, of course, I want to do it in a VB program.
-
Mar 1st, 2005, 04:11 PM
#6
Re: vertical title in excel cells
I fixed all your "New" threads as one thread. Please use the "Reply" button to reply to a posting.
What code from VB do you have already? Can you post it?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 1st, 2005, 04:42 PM
#7
Thread Starter
Member
Re: vertical title in excel cells
The code I use is simply :
with hoja.application.worksheets("produccion").range("A1:J1")
.orientation=90
end with
The result is : the texts I had in cells A1 to J1, which were oriented horizontally, become vertical . This is O.K. Bue located at the right of each cell . I would like them at the left. Thanks for all !!
Last edited by Norah; Mar 3rd, 2005 at 02:44 PM.
-
Mar 1st, 2005, 04:53 PM
#8
Re: vertical title in excel cells
This should do it.
VB Code:
With hoja.Application.Worksheets("produccion").Range("A1:J1")
.HorizontalAlignment = xlLeft
.Orientation = 90
.VerticalAlignment = xlBottom
.WrapText = False
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 1st, 2005, 05:10 PM
#9
Thread Starter
Member
Re: vertical title in excel cells
Thanks. But I don't have the values of the constants involved in your code. Please,can you send them?
-
Mar 1st, 2005, 05:19 PM
#10
Re: vertical title in excel cells
You should have them if you added a reference to MS Excel xx.0 Object Library.
VB Code:
Const xlLeft = -4131
Const xlBottom = -4107
Const xlContext = -5002
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 1st, 2005, 05:34 PM
#11
Thread Starter
Member
Re: vertical title in excel cells
Many, many thanks. It worked !!
-
Mar 1st, 2005, 05:50 PM
#12
Re: vertical title in excel cells
Your welcome 
Ps, dont forget to Resolve your thread as a courtesy to other members so
they dont read the thread only to find its already solved. 
Instructions are in my signature.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|