Recorded this macro as a test - which worked.
I copied it down and the conditional formatting sticks.
thanks, skip
Sub CF()
'
' Macro recorded 5/4/2011
'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _...
SV wrote "What kind of error do you anticipate?"
MA Response - human error.
- like miscoding the three conditions.
- picking the wrong shade of red, yellow, green
- things I haven't thought of that another human being might do when they are setting up CF.
PHV wrote "So, why asking in a...
Skip,
Yes it can be done using native CF. That is how we are doing it now.
I would like to automate the process, if possible.
This would avoid errors and would allow the process to run in batch i.e., unattended.
Any ideas?
mike
Hi,
I've seen and used code here that allows me to conditionally set formats for values in a worksheet. (Thanks to all who posted code.)
Currently I use VBA to create a pivot table and change the color of cells (outside of the pivot table) based on its value.
Example: Cell G5, which is...
PWise,
I tested it again this morning and it WORKS!
Thanks so much for sticking with me on this one.
I don't know what happened except a reboot of my computer. (I should have tried that myself.)
mike
Mydb is where the table resides.
Icon is table.
(Some of the tables have arrows, but not this one.)
Type is Table. (Others are Table: Linked Access)
In MyDev the table is "linked". MyDev is where I'm coding the ALTER TABLE with the IN clause (or the OpenDatabase) statement.
If I manually...
PWise,
I do point to the "path to database where original tables are".
So.....
MyDev points (links) to a table in Mydb.
The "IN" clause (or OpenDatabase) points to Mydb.
Am I missing something?
mike
thanks PWise for the quick response.
I tried it and got the following error:
3611 - Cannot execute data definition statements on linked data sources.
mike
Using MS Access 2003 - I want to add a new field to a "linked" table and then populate the field with data.
Why am I doing this?
Another department drops a database onto my server each week. I want to add new fields to this database so developers can use them. I can't put any code in the...
Question - how would you read all the rows in each worksheet if you don't know how many rows there are? Obviously each worksheet could have a different number of rows.
Assume you can't test for a blank cell, but must read until you get to a blank row in the worksheet.
this is what I use to print in the Immediate Window:
debug.print "Starting process xyz at : " now()
code
code
code
debug.print "Ending process xyz at : " now()
(note: VBEditor will insert a semicolon.)
Thanks Skip for the code.
And thanks for pointing out TGML. Being here five years didn't magically clue me in to all the tips and techniques available on this site. I've only posted about two questions a year and offered about two dozen tips. (Not a frequent flier by any means.)
However I...
I've seen several sample of code that aligns columns, but they all use 'unbroken' lists.
Currently this is done manually.
By cutting and pasteing L/M to a matched I value.
Insert a row where there is an L value and no I value. etc.
Very error prone.
Note: I can't copy this data, sort it, and...
Thanks for all the assistance especially NWBeaver.
Here is what worked - almost.
(It converted all the files, but died on a
Run-time error 1004
Application-defined or object-defined error.)
This code:
- finds all .csv files
- converts them to .xls
- puts all the data in...
NWBeaver,
This almost works.
It does everything I requested.
But what I notice is that when I open one of the csv files in Excel and do a 'save as' it puts everything in the correct column. This process bunches everything in the first column.
Is there a way around this behavior?
Also...
Bubba,
Thanks. I get that. It might have been nice to state something like that from the beginning.
I'll try the macro route.
What I'm trying to avoid (and I did start to post this code) is someone trying to get this to work by forcing it 'right'. Many times code like this should be...
PHV, It doesn't matter since it doesn't do what Iwant it to do and I don't want to spend time trying to get it to work.
Skip, I don't have any trouble 'reading' the CSV. I'm in need of an automated way to convert them to XLS without intervention. Please read my entire post.
I need code that will read thru a directory and convert all the .csv files to .xls (Excel2003) right back into the same directory.
I don't need any interaction with the user except to provide the path to the csv files. (If the xls file exists it should be overwritten.)
Appreciate any help...
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.