I am trying to write a code that looks down a column on one sheet and uses the cell value to reference a different sheet. Then take the adjacent cell value on the new sheet and place in power point. here is some of the code I have worked on. I have also attatched the workbook that it will be running in. Andrew coding practicemacro.xlsm
![]()
' declare the variable for the text question moving Dim myLines As Integer Dim myQues As String Dim myLoop As Integer Dim myQuestion As String ' finding the question info this will get the question number from responses sheet then look for that number on ' Questions-all then put that info into the powerpoint Sheets("responses").Select myLines = Range("A65535").End(xlUp).Row Sheets("Questions-all").Select For myLoop = 1 To myLines myQues = Sheets("responses").Range("A" & myLoop).Value Cells.Find(What:=myQues, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _ .Activate myQues = ActiveCell.responses Do Until myFirstNameAddress = myCurrAdd Cells.Find(What:=myQues, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _ .Activate myQues = ActiveCell.Address Loop myQues = "" Next ' place the question data into the slide activeSlide.Shapes(2).TextFrame.TextRange.Text = Qest 'Now let's change the font size of the callouts box activeSlide.Shapes(2).TextFrame.TextRange.Font.Size = 16 ' reference back to the active sheet of the excel sheet. Next AppActivate ("Microsoft PowerPoint") Set activeSlide = Nothing Set newPowerPoint = Nothing Application.ScreenUpdating = True End Sub











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks