LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Data Entry Form

I have a data entry Form in excel 2007 that I created in vba. I was wondering
if instead of putting the data in the next sheet if it is possible to have it
put it into a workbook on a network. Here is my code.
Thanks!


Option Explicit

Sub GoInventory()
On Error Resume Next
Worksheets("Data").Activate
End Sub

Sub UpdateLogWorksheet()

Dim historyWks As Worksheet
Dim inputWks As Worksheet

Dim nextRow As Long
Dim oCol As Long

Dim myRng As Range
Dim myCopy As String
Dim myCell As Range

'cells to copy from Input sheet - some contain formulas
myCopy = "D5,D6,D7,D8,D9,D10"

Set inputWks = Worksheets("Input")
Set historyWks = Worksheets("Data")

With historyWks
nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row
End With

With inputWks
Set myRng = .Range(myCopy)

If Application.CountA(myRng) < myRng.Cells.Count Then
MsgBox "Please fill in all the cells!"
Exit Sub
End If
End With

With historyWks

oCol = 1
For Each myCell In myRng.Cells
historyWks.Cells(nextRow, oCol).Value = myCell.Value
oCol = oCol + 1
Next myCell
End With

'clear input cells that contain constants
With inputWks
On Error Resume Next
With .Range(myCopy).Cells.SpecialCells(xlCellTypeConsta nts)
.ClearContents
Application.GoTo .Cells(1) ', Scroll:=True
End With
On Error GoTo 0
End With
End Sub

Sub GoInput()
On Error Resume Next
Worksheets("Input").Activate
End Sub




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Entry Form Brian T Excel Discussion (Misc queries) 8 March 5th 07 02:23 PM
Data entry form [email protected] Excel Programming 1 March 24th 06 08:50 PM
Data Entry form P.Jaimal Excel Programming 0 November 26th 05 05:32 PM
Data Entry Form (similar to default Excel DataForm) tonydm Excel Programming 0 October 11th 05 07:59 PM
Help with data entry form please Devon T. Sowell Excel Programming 4 February 1st 04 04:28 PM


All times are GMT +1. The time now is 06:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"