HI,
I have designed a Userform. which uses by 10 members from 10 different systems for entering Customers data. In shared drive we have a shared Excel file. Here my problem is: whatever data entering by my team from different systems, the data needs to store in one excel file which i have already saved in shared drive without opening the file. Below is example code which i have written. In my code excel file opens every time and closes. I don't want the file to open. I want data to be stored even the file is in closed status. please help me in this..
Private Sub CommandButton1_Click()
Dim RowCount As String, a As String, b As String
a = Range("a1")
b = Range("b1")
' write data to worksheet
Dim wb As Excel.Workbook
Set wb = Workbooks.Open("D:\Balaji Naik\Chit Fund\bdungav.xlsx")
RowCount = wb.Worksheets("Data").Range("A1").CurrentRegion.Rows.Count
With wb.Worksheets("Data").Range("A1")
.Offset(RowCount, 0).Value = a
.Offset(RowCount, 1).Value = b
End With
wb.Save
wb.Close
End Sub
Bookmarks