I have an excel file which needs to run a Before save macro based on the value in the dropdown. I am new and picked a macro from internet and customized it to save the file and export a range to text file. Now the plan is to have different worksheets in this workbook. The user will change the drop down and select the sheet name which should run the particular before saving of the sheet and export the data in a text file .
This is the working code for before saving which needs to be called based on drop down value
Sub Worksheet_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim ExpRng As Range
Dim myTab As String
Open [login to view URL] & "\[login to view URL]" For Output As #1
Set ExpRng = Worksheets("UPLOAD").Range("A1:T299").CurrentRegion
FirstCol = [login to view URL](1).Column
LastCol = FirstCol + [login to view URL] - 1
FirstRow = [login to view URL](1).Row
LastRow = FirstRow + [login to view URL] - 1
For r = FirstRow To LastRow
Data = ""
For c = FirstCol To LastCol
If c = 1 Then myTab = "" Else myTab = vbTab
' data = [login to view URL](r, c).Value
Data = Data & myTab & [login to view URL](r, c).Value
Next c
Print #1, Data
Next r
Close #1
I am using this code to call the before save but looks like code needs some edit
Private Sub Worksheet_Change(ByVal Target As Range)
If [login to view URL] = "$F$11" Then
On Error GoTo bm_Safe_Exit
[login to view URL] = False
Select Case [login to view URL]
Case "Rogers"
Call Worksheet_BeforeSave
Case "BMO"
Call BMO
Case Else
'Do Nothing
End Select
End If
bm_Safe_Exit:
[login to view URL] = True
End Sub
Hi,
I have done similar task just couple of hours back in vbs. This can be completed in short span of time.
Please message me the excel file you are using. I will customise it accordingly.
$35 USD en 0 día
5,0 (5 comentarios)
4,3
4,3
7 freelancers están ofertando un promedio de $123 USD por este trabajo
HI,
I am good at Excel and VBA. I have reviewed the code. Please share the Excel file to review and discuss it further. Looking forward to work on the project.
-Chandra
Hello,
I have gone through your job posting and become very much interested to work with you. I am an expert in this field. I have already completed several projects like this. For evidence you can see my profile.
Please visit : https://www.freelancer.com/u/schoudhary1553
I have excellent command over English. I am a hard worker, productive and worthy of your attention I hope, I would be the right candidate for this post. Awaiting an affirmative response from you.
Kinds Regards,
Sandeep
"""I am an Excel Expert with Professional experience working with Excel both with Formulas and Macro. Working with complicated formula and Developing Macro programs are part and parcel of my daily work.
Completed more than 190+ jobs on Freelancer majority of which was 5 star work. I understand the value of deadline and do not compromise on quality. I believe I can do a great work for you and ensure your complete Satisfaction.
I am a Business (MBA) Graduate with major in Finance and MARKETING along with 5 years of experience in different analytical roles. Currently I am working for a MNC as an B2B Analyst Manager.I believe I can do a fantastic work for you if you provide me the opportunity. """
Hi.
I read your description carefully and am very interesting in your project.
I have experience in Web Development(PHP, PYTHON, NODE.JS ANGLUAR, REACT ect ) more than five years.
Your satisfaction with the project is my top priority!
I can start right now and can help you.
If you hire me, then I will try my best level for your project to run successfully.
Looking forward to hearing from you.
Thanks.
Hi, We have been working on excel VBA since a very long time now and have worked on several of the projects. We would be happy to help you get the work done for you. Hoping to hear from you. Thank you.