Variables in Power Point need to be copied to Excel - Microsoft Community
- Get link
- X
- Other Apps
i created quiz game on powerpoint. variables adding score because able show output box current score of user. need able copy values of variables excel create database.
code have is:
dim c_clothes integer
dim c_body integer
dim c_tooth integer
dim c_bath integer
dim w_clothes integer
dim w_body integer
dim w_tooth integer
dim w_bath integer
sub savetoexcel_ampi() 'added
dim oxlapp object
dim owb object
dim row long
set oxlapp = createobject("excel.application")
'on mac change \ : in following line
set owb = oxlapp.workbooks.open(activepresentation.path & "\" & "resultsampi_macro.xlsm")
if owb.worksheets("forma_ppt").range("b1") = "" then
owb.worksheets("forma_ppt").range("b1") = "c_tooth"
owb.worksheets("forma_ppt").range("c1") = "w_tooth"
owb.worksheets("forma_ppt").range("d1") = "c_body"
owb.worksheets("forma_ppt").range("e1") = "w_body"
owb.worksheets("forma_ppt").range("f1") = "c_bath"
owb.worksheets("forma_ppt").range("g1") = "w_bath"
owb.worksheets("forma_ppt").range("h1") = "c_clothes"
owb.worksheets("forma_ppt").range("i1") = "w_clothes"
end if
row = 2
while owb.worksheets("forma_ppt").range("b" & row) <> ""
row = row + 1
wend
owb.worksheets("forma_ppt").range("b" & row) = c_tooth
owb.worksheets("forma_ppt").range("c" & row) = w_tooth
owb.worksheets("forma_ppt").range("d" & row) = c_body
owb.worksheets("forma_ppt").range("e" & row) = w_body
owb.worksheets("forma_ppt").range("f" & row) = c_bath
owb.worksheets("forma_ppt").range("g" & row) = w_bath
owb.worksheets("forma_ppt").range("h" & row) = c_clothes
owb.worksheets("forma_ppt").range("i" & row) = w_clothes
owb.save
owb.close
end sub
excel sheet not saving or copying variables.
please help.
thank you,
laresa
i was able solve issue on own. problem need have both ppt , excel workbook in same file.
needed have variables start @ 0.
thank taking time!
Office / PowerPoint / Microsoft Office Programming / Office 365 Home
- Get link
- X
- Other Apps
Comments
Post a Comment