Open Multiple Files At Once I know this is easy and I hope I am close. I want to open several files from different folders. I kow the names of the files so this is what I have. Workbooks.Open Filename:="Y:\folder\filename.xlsm" When I run the macro it says file not found. Do I have to use the following to change folders each time I a... 26 Apr 2010 16:06
Find and Replace using a Loop won't stop I am trying to replace cells on certain rows with the value in cell I1 within column I based on a found row from a cell in column C. I have the following macro: ActiveCell.FormulaR1C1 = "='Master'!R3C9" Selection.Copy TotalRowsToDo = ActiveCell.CurrentRegion.Rows.Count Counter = 1 ... 27 Apr 2010 09:55
lock first row and first column WITHOUT selecting Cell "B2" first? Hi, I'm new to this group. From a VB6-Program I create a new workbook with 1 worksheet. After writing the title row I want to set the first column and the first row non-scrollable. This is my actual code in the VB6 program: ws.Range("B2").Select ActiveWindow.FreezePanes = True I tested it, it works.... 28 Apr 2010 02:52
Before right click: I have this as the first lines of code under an open workbook in it's: This Workbook Apps Private Sub App_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) ---code--- If ActiveSheet.ProtectContents = True And ActiveCell.Locked = True Then With Application.CommandBars("C... 26 Apr 2010 16:06
VBA to export large tables from Excel to SQL Server I have spreadsheets that I distribute to users. I want Excel VBA to export large tables (2000+ rows) into a remote SQL Server 2005. I am able to successfully do this with the following generic code, but it is too slow: Dim con As ADODB.Connection Set con = New ADODB.Connection con.Open "Driver={SQL Serv... 26 Apr 2010 18:22
Open Workbook to Specific Cell I do not understand why Excel works this way, and would like help please to understand it, and how I can work around it. I am using Excel 2003. I have 2 workbooks. My test workbook (to understand how this is working) has a macro behind a button that calls... Workbooks.Open Filename:="E:\Address and Telephon... 26 Apr 2010 16:06
How to limit number of Message Boxes on Validation Error? Hi I have the following code which highlights validation errors when a user pastes into a range. The problem is that when a large amount of data is pasted (with a suitably large n number of validation errors) the msgbox has to be clicked n times before the corrections can be made. ***Start Code*** Private Su... 13 May 2010 05:03
Color Variation I want to have 20 shades of a color. 1 being the darkest, 20 being the lightest. I am going to use this to color the cell background through code based on the 1 - 20 value. If I use .color = 6684672 as the 1 value, how do I graduate this down to say ..color = 16767449 as the 20 value? ... 29 Apr 2010 04:36
Multiple reference locking/unlockng in formulas Hi All, I have several columns where i need to unlock or lock the references inside formulas in each cell (removing "$"s from references). How do I perform a massive action? Thanks. ... 26 Apr 2010 10:16
Help, help! desparate for formula help!! I need somone to tell me a formula to copy and paste into a cell in my excel worksheet. I need this for work today! Can't figure it out. Here's what I need: If SUM(C4:O4) is greater than 40, then SUM(C4:O4)-40, but if SUM(C4:O4)is equal or less than 40, then 0 Now how the heck do I make a formula with that? ... 26 Apr 2010 08:03 |