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, _...
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, _...
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...
This is probably something really obvious but now I get an error on:
.Value = Application.WorksheetFunction.Clean(.Value)
Cheers for the help Geoff...
Woody
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...
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
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...
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")...
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...
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...
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...
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.