text alignment code

what's the correct vb syntax for left-aligning the text in a cell?

thanks

k483


-- 
k483
------------------------------------------------------------------------
k483's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=10791
View this thread: http://www.excelforum.com/showthread.php?threadid=386434

0
7/12/2005 1:52:57 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
439 Views

Similar Articles

[PageSpeed] 34

select the cell
With Selection
        .HorizontalAlignment = xlLeft
End with

"k483" wrote:

> 
> what's the correct vb syntax for left-aligning the text in a cell?
> 
> thanks
> 
> k483
> 
> 
> -- 
> k483
> ------------------------------------------------------------------------
> k483's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=10791
> View this thread: http://www.excelforum.com/showthread.php?threadid=386434
> 
> 
0
BJ (832)
7/12/2005 3:08:16 PM
Reply:

Similar Artilces:

text dropped when printing
Sometimes when using several lines of text in a cell with "wrap text" the last line is dropped when printed, it shows on the monitor but does not print. Any idea why this is happening? Thanks. Are you using a true-type font? "Carol" <cstan@att.net> wrote in message news:058101c371b5$bab74ca0$a401280a@phx.gbl... > Sometimes when using several lines of text in a cell > with "wrap text" the last line is dropped when printed, > it shows on the monitor but does not print. Any idea why > this is happening? Thanks. ...

Code not working as expected
Excel 2007, XP Pro. Once agin I request your much appreciated assistance with an Excel "funny": The following code appears to run and the rest of the macro runs without any errors. However the data is NOT pasted into the cells D14 and D8 respectively. If I step through using F8 then it works, but when the macro is run using the control button it does not. No error message, just does not paste the data. Help!!! Windows("SCHOOL_MAIN_MENU.xlsm").Activate Range("K33:L33").Select Application.CutCopyMode = False Selection.Copy Windo...

Automatically include new code.
It would be nice to have a dex.ini option to have the system not prompt when including code from a new (or updated) chunk file. This way we could push updates to our clients and not deal with the support calls (which we'll get even if we send out an email ahead of time telling them to click "yes" when prompted). ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open ...

Query Text in the Mid of a memo
I am trying to query off a memo field [Description] the text that follows "User Name: " until the first space the "User Name: " is not in the same position nor is the text of the user name a fixed size. I am working with an InStr function but I don't know how to stop at the " " after the name. Thanks so much for any help. AngieSD wrote: >I am trying to query off a memo field [Description] the text that follows >"User Name: " until the first space the "User Name: " is not in the same >position nor is the text of the user n...

Chart Title or Text Box Linked to cell & sheet
I need to create charts from data collected via a com port. As i stands, the data is written to sheet 1. Chart 1 is ready to plot dat as it is written. Once the data is complete, I copy sheet 1 and char 1. This results in sheet 1(2) and Chart 1(2). All references to shee 1 on the newly created chart 1(2) automatically changes to refer t sheet 1(2). This applies to data ranges, Chart Title, Axis names. When creating text boxes refering to sheet1!$A$1, the reference doe not automacially change to sheet 1(2)!$A$1. Can this be done? If not, can I create multiple chart titles? Any help o...

Field text range problem
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Power PC In my applescript, I need to find out if the user has put the cursor in a field at the time the script is run. <br> There is no inField function and I can't seem to get a (start of / end of) text range of a field relative to the start of the document, for each field when looping through all the fields. <br> I realize that text ranges contain fields. This makes it confusing that I am trying to find a text range or selection object that may be in a field. <br><br>Here is a little scr...

Split text cell into seperate colums without splitting up a word
I have text cells with sentences ranging from 0 to 160 characters long. I want to break these into 40 character chunks (in separate cells), but don't want to split any word in half. ie, if the 40 char mark is in the middle of the work, I want to go backwards, find where the word starts and split from that point. It's exactly like a wrap text -- but I want to split those lines up into separate cells. thanks kaf If your sentence were in A1, use these 4 formulas: B1: =LEFT(A1,MAX((MID(A1,ROW(INDIRECT("1:40")),1)=" ")*ROW (INDIRECT("1:40")))) C1: =LEF...

Changing Outlook 2002 email "From" field without the "on behalf of" text
I occassionally want to send emails from an address different to my standard email account. I'd prefer not to have to change the email account details on these occassions. I have the "From" field in my New Mail template which I populate with a contact showing the email address I want the email from. Unfortunately, when the email arrives it appears as From: [mailto:myEmailAccountAddress] On Behalf Of myDesiredTemporaryFromAddress I've searched my Outlook settings and the MS site but cannot see how to get rid of this undesired annotation i.e. "[mailto:myEmail...

Adding a string to a text document at the cursor.
I'm using VC++ 6. I've created a small text editor derived from CEditView to which I've added a drop-down list of phrases off the main menu bar to be inserted into the text at the cursor when a phrase is clicked. I can't figure out how to insert the selected phrase into the text I'm editing. I also would like to know if there is a way to keep the drop-down list open after clicking on the first phrase, closing it only with 'ESC' or moving to another heading on the main menu like 'File'. Any leads greatly appreciated. >I'm using VC++ 6. I've...

Text Field Validation Rule for Date
Hi, I have a RESPONSE field on my table. This field is set up as a text field (I do not want to change it due to specific requirements)- however, I'd like to set up a validation rule to determine whether or not it is a valid date: mm/dd/yyyy. What should I input in the validation rule? Thanks I do not think it is possible at table level but in your data entry form us AfterUpdate event and IsDate function. -- Build a little, test a little. "shm135" wrote: > Hi, > > I have a RESPONSE field on my table. This field is set up as a text > fiel...

Text with Dates
in cell A1 i have some text. in cell B1 i have a date. how do I get Excel to display both the text and the date. I've tried: Dim olDate As Range Dim olText As Range Set olDate = Sheet1.Cells.Item(1,"A") Set olText = Sheet1.Cells.Item(1,"B") ..Subject= olText +" - " + olDate I was hoping to get something like "text - 6/9/05" in the subject bar, but everytime I do this i get a run time error. i've tried replacing the date with text and it works just fine, and i've also tried just the date cell and it works fine. the problem comes up when i...

How do I combine 2 text columns in Microsoft Excel?
I have two columns of descriptive text, the second column is the end of the first column's sentence, however I can not find a way in the Help options to combine the text values to create one complete sentence in one column. Does anyone know of a way to do this? Try: =A5&" "&B5 if you want spaces between the columns or look at the CONCATENATE function example =CONCATENATE(A5,B5) Domaniman wrote: > I have two columns of descriptive text, the second column is the end of the > first column's sentence, however I can not find a way in the Help options to ...

looking for a script to make a Distribution List from a text file
Does anyone have a script for making a new Distribution List from a text file, or CSV file? I created larger dist lists by using adduser. Then, once the group is created, I mail enable it. "BwiseIT" wrote: > Does anyone have a script for making a new Distribution List from a text > file, or CSV file? > > > ...

Delete part of text from field
Hi all Here's my challenge: I'm processing a customer info file with your standard demographics - first name, last name, age, address etc. The last name appears in all of the 'last name' fields; no problem. However, in some of the 'first name' fields the last name appears again, like so: F_Name L_Name Title Kris Doft Doft Manager Johan Smith Accountant Maria Katson Katson Director Anne Charles Charles Supervisor Is there a query that can get rid of the duplicate last name in the '...

Code efficiency of Sumproduct()
Two formulae generating the same result: {=SUM(array1*array2*...arrayn)} =SUMPRODUCT(array1*array2*...arrayn) Does the non-array version use up fewer PC resources and/or calculate faster than the array version? Or do they both compile the same way? -- Return email address is not as DEEP as it appears Hi use =SUMPRODUCT(array1,array2,...,arrayn) This should be faster than the other two versions -- Regards Frank Kabel Frankfurt, Germany Jack Schitt wrote: > Two formulae generating the same result: > {=SUM(array1*array2*...arrayn)} > =SUMPRODUCT(array1*array2*...arrayn) >...

can I sort text data into bins?
Hi, Here's my problem - I hope you can understand it & help: Let's say I've got a column, A (or row 1, it doesn't matter) that contains cells, each with a single word/category that I'm interested in [example: dog, cat, bird, fish, gerbil] - we can assume that this is my list of category headers/titles. Plus I've also got various other columns, A-D (or rows) next to my column A titles that each contain a list of items, one per cell: [eg: B1=dog + B2=cat, C1=bird + C2=cat + C3=gerbil]. Perhaps it would be clearer if I drew it out (ignore the dashes, they're j...

Unable to send mobile text (SMS)
I just upgraded (forced) to WLM 2009. From what I've seen it's not bad but I do miss using version 8.5. Anyway, when I select a contact under Mobile, the contact box opens up but when I move the cursor to the dialog box to start typing, it won't let me type anything. If I go to my laptop which is using WinXP and WLM 8.5, everything works. I checked and all my contacts have their cell numbers. Any suggestions?? I take it no one else is seeing this problem? I just installed W7 and WLM 2009 on my laptop and it works fine. I would hate to do another clean install just to get...

Form code not behaving as expected
2 issues, one is a coding issue and one I think I may be able to fix with code. 1. I have a form (frmContact) where users enter time sheet data. Time is broken down into 7 different categories and into .5 hour increments within those categories. Each category is displayed as a list box. When a user enters time into the list boxes, the time they chose is highlighted. If they go on to a new record, and then back to the previous record to view or edit it, the time they chose is no longer highlighted, so they have no way of knowing the time that is being held in that record. That isn&...

clistctrl drag image not showing text
I am using a class derived from clistctrl. I am using the CreateDragImage function to create the image shown when dragging. My understanding is that this should create an image of both the icon displayed as well as the text for the particular item I am dragging, however all I am getting is the icon with no text. I am sure this has something to do with the fact that this is a derived class, but does anyone know any other workarounds for getting the text to display in the drag image? Thanks, Derrick could i create a bitmap from the rect of the selected item on screen and use that bitmap for t...

How to insert 3 images into excel with aligning each positions?
Does anyone have any suggestions on how to insert 3 images into excel with aligning each positions? Please see following code for detailed description. Does anyone have any suggestions? Thanks in advance for any suggestions Eric Private Sub Worksheet_Change(ByVal Target As Range) Dim myPic As Object Dim dblTop As Double Dim dblLeft As Double Dim dblHeight As Double Dim dblWidth As Double If Target.Address = "$A$1" Then On Error Resume Next Set myPic = ActiveSheet.Pictures(1) On Error GoTo 0 If Not myPic Is Nothing Then myPic.Delete If Range(&quo...

How to import a text file to Excel treating all input content are in string.
Hi All, I would like to share my excel problem, please help me out. I want to load a text file which contains string and floating values, but the floating values are getting affected by the regional settings. So I need excel should treat all column inputs as string. For example: "6.000" => 6.000 Here if Digit Grouing Symbol set as '.', then my output looks some thing like 600.000 Thanks in advance Chittu In Addition: The number of cell is not known, it may go upto 256, when I was trying to set the individual 'FieldInfo' to 'xlTextFormat' of all 256 c...

Text Import Wizard Does Not Pop Up
I'm opening a text file (from a networked location) in Excel and the Text Import Wizard no longer pops up, instead I get an error msg "file cannot be accessed. The file maybe read only". I'm using Office XP with SP3 in windows 2000 sp4. This file is located in my home drive. I can copy this file to my C: drive and open it without a problem. ...

How to convert mail folder to text files
Hi, Could someone suggest the best way to convert the contents of the local outlook news/mail folders into text files? The idea, of course, is to avoid manually editing each and every message. Thnx, Andre "AW" <one_at_large@hotmail.com> wrote in message news:11ob6tcqn9p5kd4@corp.supernews.com > Hi, > Could someone suggest the best way to convert the contents of the > local outlook news/mail folders into text files? > The idea, of course, is to avoid manually editing each and every > message. > Thnx, > Andre Install Mozilla Thunderbird ...

Just one cell in an Excel column won't text wrap.
I'm using Excel for text entries. I selected one column, and formatted the cell alignment to wrap text. This has been working just fine until the last 3 entries, which have reverted to hidden text. (I can see that the text is there, but only a portion is showing.) When I check the individual cells, they show the formatting to be for wrapped text. I've tried undoing the formatting for the entire column, and starting over again. The cells that were wrapped revert to their wrapped state, and these "unwrapped" cells go back to being unwrapped again as well. I'...

Convert inbound HTML to Plain Text
Is there an Exchange 5.5 serer setting that converts inbound mail (from the internet) from HTML to Plain Text so that users can only view email as plain text via Outlook? Thanks in advance. ...