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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: woodyinoz
  • Order by date
  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!
  14. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    Frederico, I've taken a look at the two examples you've given me and I have a question about it. If I change the example you have given to suit my datasource I get a user defined type not defined error on the following line: Dim adoConn As ADODB.Connection I'm assuming that this is because...
  15. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    Chance, Cheers for this... I've taken the above example you've given me but am getting an error on the Global objUserConnection As Object line. It gives me a compile error saying: Constants, fixed-length strings, arrays, user-defined types, and Declare statements not allowed as Public members...
  16. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    Can you explain this a little.... Where do I put it? I'm a complete and utter beginner when it comes to this! The terms 'spoon feeding' comes to mind!
  17. woodyinoz

    Transferring data from Excel to SQL Server using VBA

    Ok, I've checked through a million posts but I'm still no closer to working out how to do it! All I have is 3 columns worth of data in an Excel spreadsheet that I need to move into a SQL Server table. Everythime the Excel data needs to overwrite whats in the table..... Can anyone give me an...

Part and Inventory Search

Back
Top