vba

Forum home » Delegate support and help forum » Microsoft VBA Training and help » VBA

VBA

resolvedResolved · Urgent Priority · Version 2003

Edward has attended:
Excel VBA Intro Intermediate course
Access Introduction course
Access Intermediate course
Access Advanced course
Access VBA course

VBA

I have a worksheet with multiple rows and columns

In each cell running down column A I have a macro button which when pressed should export just that line of data.

I have written the code to do what i want but when i try and apply the macro to the cells below it uses the same macro, and will export from the first row in the data base.

so basically i want the macro in A2 to cut and paste b2,c2,d2 etc. and the macro in A3 to cut and paste B3,c3,d3 etc.

How do i copy the macro down across say 100 lines and get it it to cut and paste just the info on that line, because at the moment i would have to write 100 macros.

Many Thanks for any help you are able to offer

Kind Regards

Ed

RE: VBA

Hi Ed

Thank you for your question

It is difficult to advise you directly without seeing your spreadsheet. If possible, could you email me a copy of the workbook, and I will give it my urgent attention.

My email is stephenATstl-training.co.uk

Regards

Stephen

RE: VBA

Hi Ed

Stephen has updated me on your request, he has had a look at the workbook you forwarded, thanks for this, and we have established that it will take at least 1/2 day to work and resolve.

This sort of work is consultancy and if you wish to know more on how we can assist please let me know.

Regards

Jacob

RE: VBA

i am interested in hearing about how best to resolve my query, please contact me to discuss consultancy rates on 07879403987

Kind Regards

Ed

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

VBA tip:

Use VbNullString instead of

When needing to default a String variable back to it's default of "" use vbNullString as in the following example:

Sub ClearText()

Dim strEmpName As String

strEmpName = "John Smith"
MsgBox strEmpName

strEmpName = vbNullString
MsgBox strEmpName

End Sub

View all VBA hints and tips


Server loaded in 0.05 secs.