Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Write Data to Excel Database
I have an input form that I am trying to update an excel database with. What
I need the macro to do is using the account number find the entry in the database and write the value that are on the input form. Would the find and offset be the best way to do this or is their another alternative. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Write Data to Excel Database
I would say yes.
-- Regards, Tom Ogilvy "James W." wrote in message ... I have an input form that I am trying to update an excel database with. What I need the macro to do is using the account number find the entry in the database and write the value that are on the input form. Would the find and offset be the best way to do this or is their another alternative. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Write Data to Excel Database
Hi,
If you are using a userform then this may help. Private Sub CommandButton1_Click() Application.ScreenUpdating = False '' This assumns you have a userform1 with txtbox named txtaccount With UserForm1 Cells.Find(What:=txtaccount, LookIn:=xlValues, LookAt:=xlPart).Activate If Err = "91" Then MsgBox "Could not find Account: " & .txtaccount Exit Sub End If ''' assumes account is in column "A" ''' Cells(ActiveCell, 2).Value = .txtmytxt1 ''' assumes value goes in column 2 ''or Cells(ActiveCell, 1).Offset(,1).Value = .txtmytxt1''' assumes value goes in column 2 Cells(ActiveCell, 3).Value = .txtmytxt2 ''' assumes value goes in column 3 Cells(ActiveCell, 4).Value = .txtmytxt3 ''' assumns value goes in column 4 Cells(ActiveCell, 5).Value = .txtmytxt4 ''' assumns value goes in column 5 End With End Sub "James W." wrote in message ... I have an input form that I am trying to update an excel database with. What I need the macro to do is using the account number find the entry in the database and write the value that are on the input form. Would the find and offset be the best way to do this or is their another alternative. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Write Macro to Fix Data Alignment (Data dump from Crystal to Excel | Excel Discussion (Misc queries) | |||
database query not showing foxpro database How I import data | New Users to Excel | |||
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? | Excel Worksheet Functions | |||
Write Data to a database | Excel Programming | |||
Write data to access file through EXCEL | Excel Programming |