Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by woodyinoz

  1. woodyinoz

    Using a finds results in an if statement

    Hi all, I've got the following code which performs a find on a worksheet looking for a value held in the variable strCont: Cells.Find(What:=(strCont), After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _...
  2. woodyinoz

    Inserting Records into SQL Server

    Sorry, ignore this! I've cracked it!
  3. woodyinoz

    Inserting Records into SQL Server

    Hi all, I have the following code which should take the information held in column A and input it into a sql server table: Sub InsertRecords() Dim DB As DAO.Database Dim stList As String Dim R As Range Set DB = DBEngine.OpenDatabase("SQLSvr", _ dbDriverNoPrompt, True, _...
  4. woodyinoz

    Using clean on a single column not a whole worksheet

    Here you go... I'm trying to do a clean on column M only. Sub cleanup() Dim TheCell As Range For Each TheCell In ActiveSheet.UsedRange.Columns(13) With TheCell If .HasFormula = False Then .Value = Application.WorksheetFunction.Clean(.Value) End If End With Next...
  5. woodyinoz

    Using clean on a single column not a whole worksheet

    Geoff, I've tried both... The error is the same 'Type Mismatch'. Any other ideas?
  6. woodyinoz

    Using clean on a single column not a whole worksheet

    This is probably something really obvious but now I get an error on: .Value = Application.WorksheetFunction.Clean(.Value) Cheers for the help Geoff... Woody
  7. woodyinoz

    Using clean on a single column not a whole worksheet

    Hi all, I'm looking to use the clean command on a single column rather than a whole worksheet. Can I do this? I've got the following code so far: [Code] Sub cleanup() Dim TheCell As Range For Each TheCell In ActiveSheet.UsedRange With TheCell If .HasFormula = False Then...
  8. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    Hi I'm back! Ok, I think I'm getting there... Eventually! I'm getting an error on the following line of code: Set wWork_sheet = Workbooks("TrialCode").Worksheets("Sheet1") It's giving me a subscript out of range error. Any ideas? Woody
  9. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    This is what I am trying to do. I will have a sheet with 5 or 6 columns in it, filled with data. At the end of every month the user will change this data to what they want, possibly adding more rows, possibly removing some. When they are happy with what they have, I then want them to press a...
  10. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    Sorry.... Replace Dim sConn as String Dim sSQL As String with Dim adoConn As ADODB.Connection Dim adoComm As ADODB.Command
  11. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    Ok, I've managed to set up a connection with the following code: Sub putdata() Dim sConn As String Dim sSQL As String Dim strConnectionString As String 'Set the connection strConnectionString = "DSN=SQLSvr;uid=sa;pwd=5ql53rv3r;database=devlog" Set adoConn = CreateObject("ADODB.Connection")...
  12. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    I'm using Excel 2003. Sorry I should have said that earlier.
  13. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    I don't get a References option within the Tools menu!

Part and Inventory Search

Back
Top