If you slect all pictures /F%/Spcial/"Objects") and make sure that the pictures move with cells ('Format picture', properties tab) and the fill the cell with something (a space would be sufficient). Now try sorting again, make sure the column with the spaces are sorted as well.
Should do it...
Take a look at faq707-5844 in the VBA forum. You'll need to adjust to Word of course, as well as adjust the connection string, but the basics about ADO and recordsets apply.
// Patrik
______________________________
To the optimist, the glass is half full. To the pessimist, the glass is half...
For your query this sql qould be sufficient
...
WHERE CASE WHEN field>=10500 AND field<=16000 THEN 1000 ELSE field/10 END AS resultheader
...
// Patrik
______________________________
To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the IT Professional...
quite possible.
define the connection string as a string variable, and combine with if, case or any other method to return "april05" as a string value.
'This can by calculated on DATE, entered like string (like below) or retrieved from a cell, possibilities are unrestricted
MyMonth =...
Use application.enableevents = false
disables all events (workbook_open etc)
DON'T forget to set it back to true again, it's one of those settings that doesn't turn itself back on again automatically...
use application.displayalerts = false to turn the save questions etc off. Same thing there...
As Harley said, setting the security level to medium/normal, and disabling macros when asked does the trick.
But you can normally abort the code once it's running, by multiple times pressing [ESC]. Then you'll (probably) be asked wether to abort or debug. Choose debug, and you'll face the code...
All right quys, enough with the irony.
Nitha, in future cases, try to find information in other locations than these foras, since what your asking for is very basic. You'll probably find it in the FAQs or by using SEARCH as well.
However, I believe all questions asked politely deserves an...
...since you're JOINing on workorder_number, it seems to me that the entire GROUP BY part is unnesseccary. However, I'm no Sql expert, and the problem might be situated elsewhere. Nut as I said previously, if the code (VBA) is executed without problems, then the issue lies with the sql string...
When using .movenext on your recordset, and the do - loop functions as you are, you are making yourself voulnerable for spelling mistakes etc.
Take a look at faq707-5844 , which lets you return the Recorset to Excel without defining the column headers and which field going where.
I'm not...
The following lets you define your query as a string variable, creates a connection to an Access database you define (with or without username and password), opens a recordset to the open database, returns the result of your query (including headers) to the active sheet in excel, closes and...
Your data is 'Sheet1' in code below. If you insert a sheet ('Sheet2') with all the new sheets names in Col A and the thing to filter for in Col B, starting at row 1 (no headers), then something like this should do:
dim n as integer, ShN as string, Cr as string
sheet2.activate
for n = 1 to...
In later versions the grayed out option would indicate that the share is protected (tools, protection, portect shared workbook) with a password.
I suppose you mean she cannot unfreeze the panes? If she can, can she freeze them again?
Since VBA cannot be edited in shared mode, can you unlock...
ftoddt,
You can of course adjust the size of your form with IF-statements or select case on height/width. Same thing with font size etc:
Private Sub UserForm_Initialize()
Dim i As Integer, MySize As Variant
Application.WindowState = xlMaximized
UserForm1.Height = Application.Height...
Take the list (PT) you have, turn into values (copy, paste special: values), add two columns: TYPE2 and DESCRIPTION2
In my example below the columns are set as follows: YEAR = Col A, TYPE = Col B, Desc = Col C, PARTNO = Col D, PRICE = Col E, TYPE2 = Col F, DESCRIPTION2 = Col G
I'm also...
DON'T FORGET to turn it on again in the end of the code - that is a setting that doesn't turn on again manually!
// Patrik
______________________________
To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the IT Professional, the glass is twice as big as it...
Hi,
I'd go with a pivot table on two columns of data - PART CODE and PART DESCRIPTION from BOTH tables (2004&2005) on top of each other.
Put both fields in ROW in the pivot table layout form, and whatever in DATA (like Count of Part etc), then finish.
Now you'll have a 'totals' row between...
Perhaps this is what you want - but it is limited to two search criterias.
Public Function VLOOKUP2(Search1 As Variant, Table As Range, ResCol As Integer, Optional Search1Col As Integer = 1, Optional n As Integer = 1, Optional Search2 As Variant = False, Optional Search2Col As Integer)
'...
The combobox is returning a cellcount inside the range of your combobox - meaning that if it returns a 2, it is the second value of the combobox range.
There are several ways of getting the actual value in your cell (if I understand your questions correctly?):
1/ Use HLOOKUP, same range as the...
Littlewoman,
Your suggestion will only work if excel treats the date the way David wants from the beginning. The problem here is that Excel interprets the date provided according to the regional standards in Davids computer(mm/dd/yyyy), rather than the format of the data provided (dd/mm/yyyy)...
If you can get the data as text into Excel, there are many ways of achieving what you want. One is using DateSerial along with left/right:
MyDate = DateSerial(right([A1].value,2),left([A1].value,2),right(left([A1].value,5),2))
// Patrik
______________________________
To the optimist, the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.