So I tried and I am new to VBA however tried this much and this worked .I really need help.

MayraBotla

New Member
Joined
Jan 2, 2024
Messages
2
Platform
  1. Windows
So I tried and I am new to VBA however tried this much and this worked . Basically copying data from one sheet to another. But I wanted something like when I share this file with the team members and when they hit submit all their answers should be saving in one single workbook that is saved in my computer.

here is the code I tried:
Sub Submit()

Dim wkdatabse As Worksheet
Dim AddDatabse As Range
Dim msgValue As VbMsgBoxResult

msgValue = MsgBox("Do you want To save the data?", vbYesNo + vbInformation, "Confirmation")

If msgValue = vbNo Then Exit Sub

Set wkdatabse = Sheet4

Set AddDatabse = wkdatabse.Cells(wkdatabse.Cells(wkdatabse.Rows.Count, "A").End(xlUp).Row + 1, 1)



With AddDatabse
.Offset(1, 0).Value = Sheets("Imaging").Range("p6").Value
.Offset(0, 1).Value = Sheets("Imaging").Range("p7").Value
.Offset(0, 2).Value = Sheets("Imaging").Range("p8").Value
.Offset(0, 3).Value = Sheets("Imaging").Range("p9").Value
.Offset(0, 4).Value = Sheets("Imaging").Range("p10").Value
.Offset(0, 5).Value = Sheets("Imaging").Range("p11").Value


End With

End Sub


Appreciate your help. So this one when they hit submit in imaging tab the data entered there will be saved in sheet 4
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top