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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

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