Standard entry from another worksheet

bartmanekul

Board Regular
Joined
Apr 3, 2017
Messages
58
Office Version
  1. 365
Platform
  1. Windows
I just need a pointer for this one.

Tried googling, but think I'm putting the wrong terms in.


I have a template spreadsheet, which people use for scoring.

This data needs to go into a table, and although I've made it as easy as possible - set it up so they only have to copy and paste a single line into the data table, I'd still much rather not have them in the table in the first place.

So first:

Is it possible to include a button for them to press on this template sheet which will add the results to a new row in a data table in another spreadsheet?

If so, how do I do this? I've never touched VBA, though if there's existing code I can likely modify to my needs.

Again, if possible, is there anything that can be done to stop someone from adding an entry twice (i.e. they press the button again)?

Thanks in advance.
 
Did you ever resolve this.?

Code:
DatabaseName = Cells(Rows.Count, 1).Value
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Did you ever resolve this.?

Code:
DatabaseName = Cells(Rows.Count, 1).Value

Golly, I thought this was resolved long time ago

All OP needed to do was add a button to template workbook & call the function

Code:
Private Sub CommandButton1_Click()
    Dim DatabaseName As Variant
    DatabaseName = BrowseFile
    If DatabaseName = False Then Exit Sub
    Cells(Rows.Count, 1).Value = DatabaseName
End Sub

Dave
 
Upvote 0
My interpretation was that the o/p needed to change the location of the database workbook?
If I understood your code correctly, that would just mean changing the value in the range I posted earlier.?
 
Upvote 0
The function calls the GetOpenFilename dialog which is used to get the path & filename to the database workbook.

This string is stored at the cell address & is referenced by SaveTemplateData code.

Dave
 
Upvote 0

Forum statistics

Threads
1,215,335
Messages
6,124,327
Members
449,155
Latest member
ravioli44

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