adjust template?

Dxmiian

New Member
Joined
Jan 25, 2020
Messages
36
Office Version
  1. 365
Platform
  1. Windows
Dynamic Customer Call Log Form in VBA - TheDataLabs i found this template and it would be great for a call log. it needs some tweaking though and i could use some help. i would like to remove the "country" and "product name feature and just post info onto one page. is this possible to remove from the macro and still post all other info? to break down in sheet "form" remove D11 - H11 & D13 - H13. Then remove all "country" sheets. but keep 1 to post info on to and keep columns B, C, F, G & H. i know its asking a lot but any input/help would be great

VBA code to reset the form
1
2
3
4
5
6
7
8
9
10
Sub Reset_Form()

Dim iMessage As VbMsgBoxResult

iMessage = MsgBox("Do you want to reset this form?", vbYesNo + vbQuestion, "Reset Confirmation")

If iMessage = vbNo Then Exit Sub

ThisWorkbook.Sheets("Form").Range("H7,H9,H11,H13,H15").Value = ""
End Sub

VBA code to submit the data
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Sub Submit_Details()

Dim shCountry As Worksheet
Dim shForm As Worksheet

Dim iCurrentRow As Integer

Dim sCountryName As String

Set shForm = ThisWorkbook.Sheets("Form")

sCountryName = shForm.Range("H11").Value

Set shCountry = ThisWorkbook.Sheets(sCountryName)

iCurrentRow = shCountry.Range("A" & Application.Rows.Count).End(xlUp).Row + 1

With shCountry


.Cells(iCurrentRow, 1) = iCurrentRow - 1

.Cells(iCurrentRow, 2) = shForm.Range("H7")

.Cells(iCurrentRow, 3) = shForm.Range("H9")

.Cells(iCurrentRow, 4) = shForm.Range("H11")

.Cells(iCurrentRow, 5) = shForm.Range("H13")

.Cells(iCurrentRow, 6) = shForm.Range("H15")

.Cells(iCurrentRow, 7) = Application.UserName

.Cells(iCurrentRow, 8) = Format([Now()], "DD-MMM-YYYY HH:MM:SS")


End With

shForm.Range("H7, H9, H11, H13, H15").Value = ""

MsgBox "Data submitted successfully!"

End Sub
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Your post #2 is good to tell us no more help is required, but since it does not actually answer the original question, it should not have the 'Mark as Solution' tick so I have removed that.
 
Upvote 0
Your post #2 is good to tell us no more help is required, but since it does not actually answer the original question, it should not have the 'Mark as Solution' tick so I have removed that.
Ah okay sorry, I’m unsure if I could delete the post so I thought that be best so I don’t wast peoples time.
 
Upvote 0
No, you cannot delete the post/thread so just posting back to say you don't need any more help is exactly what you should do. (y)
 
Upvote 0
Note that if you solved the problem yourself, if you post what the issue actually was and then post the solution, you CAN then pick that post as the solution.
In a nutshell, any post marked as a solution should actually contain the solution.
 
Upvote 0

Forum statistics

Threads
1,224,829
Messages
6,181,222
Members
453,024
Latest member
Wingit77

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