Search results

  1. D

    Automate Edits to xls Spreadsheet

    I am trying a different looping code, but The following code has 2 problems that I don't know how to fix. 1. The "Sheet1" variable is not defined. The code works by itself, but when added to the looping piece code, the error "variable not defined" comes up. 2. The looping process is not...
  2. D

    Automate Edits to xls Spreadsheet

    Thank You. I will use the code tags in the future. Sorry 'bout that. The above code works for one spreadsheet, but then stops it doesn't continue to loop through each sheet in the folder. Any ideas on what to change to make this happen will be appreciated.
  3. D

    Automate Edits to xls Spreadsheet

    I found an idea in my searches; to leave the macro code in one master spreadsheet in a specific folder, then run the code from that master spreadsheet to loop through any spreadsheets in that same folder. Below is the code, however it isn't working quite right, it does not do the "'Add new...
  4. D

    Automate Edits to xls Spreadsheet

    1) This code works perfect Sub PrepData() Dim RwExt As Long RwExt = ActiveSheet.UsedRange.Rows.Count 'this counts the number of rows on the sheet 'Add new sheet, copy data and delete old sheet Range("A1:G" & LTrim(Str(RwExt))).Select Selection.Cut Sheets.Add After:=Sheets(Sheets.Count)...
  5. D

    Automate Edits to xls Spreadsheet

    Some Thoughts: After reading this I am now wondering if it would be better to import the excel data sheet just as it is, then manipulate it once it's in Access. The way it is set up currently is manual manipulation of each data sheet, then automatic import to Access (using a button in Access)...
  6. D

    Automate Edits to xls Spreadsheet

    Isskint: This looks excellent. There seems to be something wrong with this line/lines of code. I’ll keep looking for what is wrong, but you may see it quicker than me. Range("A2") = InputBox("Please enter the PIN number", "PIN request") Range("A2:A" & LTrim(Str(RwExt))).Select...
  7. D

    Automate Edits to xls Spreadsheet

    The macros are below: Sub AddColumn1() ' ' AddColumn1 Macro ' ' Columns("A:A").Select Selection.Insert Shift:=xlToRight Range("A1").Select ActiveCell.FormulaR1C1 = "PIN" Range("A2").Select ActiveCell.FormulaR1C1 = "1072" 'This needs to be user input...
  8. D

    Automate Edits to xls Spreadsheet

    We receive multiple spreadsheets daily. Each one of these spreadsheets needs to be manually edited before being imported into MS Access. I am looking for a way use VBA code to automate the manual edit process. The following are the edits that need to happen to each of the spreadsheets. ·...
  9. D

    Complicated Looping

    I realize I fail at explaining what I want. I'll have to work on that. I did find code that works great for what I need. Here it is: Dim MyDB As DAO.Database Dim rst As DAO.Recordset Dim rstResults As DAO.Recordset Dim intFldCtr As Integer Dim blnFoundATrue As Boolean Dim varEventID As...
  10. D

    Complicated Looping

    Hi, There is a table named tblFreezer_1 with the fields : PIN Freezer Time Fahrenheit 1 A 05/15/2012 10:11 74 1 A 05/15/2012 10:13 68 1 A 05/15/2012 10:20 57 1 A...
  11. D

    Complicated Looping

    I know MS Access very well, but am fairly new to writing vba. This one has me completely confused. Here is my task (written in English), not vba: ‘Variables that already exist in the table I want to loop through are: ‘”Fahrenheit” and “Time” 'Create new variables 'Dim startTime...
Back
Top Bottom