Jump to content
One on One Extensive Advanced Excel Training ×
Business Intelligence & Analytics for Digital Transformation

About This Club

Join the club and share tips and tricks of VBA macros for Excel

More Info

vba - excel programming

  1. What's new in this club
  2. Hi Saurabh, Completed the assignment. PFB the screenshot for reference-
  3. Hi Saurabh, I have completed all the 3 assignments. PFB the screenshots for reference- Exercise 1 Exercise 2 Exercise 3
  4. Hi Saurabh, Completed the exercise. PFB the screenshots for reference -
  5. Hi Saurabh, Could you please explain how to comment particular lines of code so that it won't get compile and run ? for example- how to comment code written for "45" in below screenshot ?
  6. Hi Saurabh, Able to complete the assignment but getting confused in figuring out the correct cell range and ending up doing hit and trial . Is it possible to provide a image which shows what cell range value need to select (for both Cell & Offset) while going up, down, left and right ?
  7. Hi Saurabh, I am able to complete the assignment but when giving range in negative integer why it is not uniform. I meant, if we see code written for #2 & #6 , for# 2-> cell range is (1, 4) but for #6 -> cell range is (1, -4) whereas I expect cell range to be (1,-6). Hope you are able to understand my question ?
  8. I did assignment asked regarding - MySecondMacro and it got combined with first macro
  9. Sub cells_example() Range("J10").Cells(1, 1).Value = "Usman" Range("J10").Cells(1, 4).Value = "Usman" Range("J10").Cells(5, 3).Value = "Usman" Range("J10").Cells(8, 1).Value = "Usman" Range("J10").Cells(3, -2).Value = "Usman" Range("J10").Cells(1, -4).Value = "Usman" Range("J10").Cells(-3, -3).Value = "Usman" Range("J10").Cells(-5, 1).Value = "Usman" Range("J10").Cells(-2, 3).Value = "Usman" End Sub
  10. Sub word_excel_multitable() Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.WorkSheet Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True Set xlBook = xlApp.Workbooks.Add Set xlSheet = xlBook.Worksheets(1) rn = 0 cn = 0 For Each t In ActiveDocument.Tables For Each r In t.Rows For Each c In r.Cells xlSheet.Range("A1").Offset(rn, cn).Value = Left(c, Len(c) - 1) cn = cn + 1 Next c cn = 0 rn = rn + 1 Next r rn = rn + 2 Next t End Sub The code has to be pasted in module of word document Set reference for Excel object library in word so that word can write in Excel Click Tool > References
  11. Done filling names in highlighted cell. It was interesting.

  • Create New...