I'm guessing that instead of:
you want:Code:.VerticalAlignment = x1VAlignTop
I changed the "1" for an "l".Code:.VerticalAlignment = xlVAlignTop
I'd be very grateful indeed for any help you can give me - this silly little problem is driving me mad!
I work in the wine trade and often send out offers of wines in Excel with tasting notes. I do this so often that I've written a macro to format the notes for me, to save time doing it myself.
My little macro works really well, except it won't set the vertical alignment to the top. The error message I receive says:
Run Time Error '1004'
Unable to set the VerticalAlignment property of the Range class.
My code is below - can someone please tell me what I'm doing wrong??
Dim i As Long
For i = 4 To 200
If Cells(i, 1) <> "" And Cells(i, 2) = "" And Cells(i, 4) = "" Then
Range(Cells(i, 1), Cells(i, 8)).Select
.Font.Italic = True
.WrapText = True
.MergeCells = True
.VerticalAlignment = x1VAlignTop
ps - if anyone ever needs anything translated from french into english - let me know
Kind regards, and thanks lots in advance for any help,
There are currently 1 users browsing this thread. (0 members and 1 guests)