snasui.com ยินดีต้อนรับ
ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
ฟอรัมถาม-ตอบปัญหาการใช้งานสูตรและฟังก์ชัน Excel
Forum rules
ไม่อนุญาตให้ใช้ภาษาแชทในการถามและตอบปัญหา ไม่ใช้คำว่า "คับ" หรือ "อ่ะครับ" แทนคำว่า "ครับ" ไม่ใช้คำว่า "เด๋ว" แทนคำว่า "เดี๋ยว" เป็นต้น เนื่องจากเมื่อแปลเป็นภาษาต่างประเทศแล้วจะให้ความหมายผิดไปจากที่ควรจะเป็น
ห้ามถามโดยระบุชื่อผู้ตอบและต้องตั้งชื่อกระทู้ให้สื่อถึงปัญหาที่จะถาม ไม่ตั้งชื่อว่า ช่วยด้วยครับ, มีปัญหามาปรึกษาครับ เป็นต้น
กรุณาอธิบายปัญหาและระบุคำตอบที่ต้องการมาในกระทู้ด้วยเสมอถึงแม้จะอธิบายไว้ในไฟล์แนบแล้วก็ตาม ทั้งนี้เพื่ออำนวยความสะดวกแก่เพื่อนสมาชิกในการค้นหาข้อมูล
กรุณาแนบไฟล์ตัวอย่างพร้อมแสดงคำตอบที่ถูกต้องมาในไฟล์ด้วยเพื่อให้ง่ายต่อการทำความเข้าใจและสะดวกต่อการตอบคำถาม (ขนาดไฟล์ไม่เกิน 500Kb ขนาดภาพไม่เกิน 800*600 Pixel) ไม่แนบเป็น Link มาจากแหล่งอื่นที่อาจจะถูกลบทิ้งไปโดยต้นทางในภายหลัง นอกจากนี้ไม่ควรแนบไฟล์ที่มีข้อมูลสำคัญอันก่อให้เกิดความเสียหายกับตนเองและผู้อื่น
กรณีเป็นคำถามเกี่ยวกับ Programming เช่น VBA, VB.Net, C#, SQL ฯลฯ ต้องลองเขียนมาเองก่อนเสมอ ถามเฉพาะที่ติดปัญหา ระบุ Module, Procedure ที่ติดปัญหาให้ชัดเจน กรุณาโพสต์ Code ให้แสดงเป็น Code คือเปิดด้วย [code] และปิดด้วย [/code] ตัวอย่างเช่น [code]dim r as range[/code] เพื่อให้แตกต่างจากข้อความทั่วไป สะดวกในการอ่านและทดสอบ (คลิกเพื่อดูตัวอย่าง)
กรุณาแจ้งผลการใช้งานเมื่อได้รับคำตอบว่าตรงกับความต้องการหรือไม่
March201711
Gold
Posts: 1047 Joined: Sat Mar 11, 2017 7:01 pm
Excel Ver: 2010, 365
#1
Post
by March201711 » Wed Aug 29, 2018 12:16 pm
ถ้าเราจะ copy จาก file excel ไป paste picture ที่ file ใหม่เป็น file powerpoint เราสามารถทำได้ไหมค่ะ ลอง record marco แล้วทำ ไม่ได้น่ะค่ะ เพราะต้องทำเป็นประจำทุกวันค่ะ
You do not have the required permissions to view the files attached to this post.
March201711
Gold
Posts: 1047 Joined: Sat Mar 11, 2017 7:01 pm
Excel Ver: 2010, 365
#2
Post
by March201711 » Wed Aug 29, 2018 12:17 pm
file excel ค่ะ
You do not have the required permissions to view the files attached to this post.
snasui
Site Admin
Posts: 31257 Joined: Sun Jan 24, 2010 12:33 pm
Location: Songkhla, Thailand
Excel Ver: 2010, 2019
Contact:
#3
Post
by snasui » Wed Aug 29, 2018 10:37 pm
ไม่พบ Macro ในไฟล์ที่แนบมาครับ
March201711
Gold
Posts: 1047 Joined: Sat Mar 11, 2017 7:01 pm
Excel Ver: 2010, 365
#4
Post
by March201711 » Thu Aug 30, 2018 11:39 am
แนบมาให้ใหม่ค่ะ
You do not have the required permissions to view the files attached to this post.
March201711
Gold
Posts: 1047 Joined: Sat Mar 11, 2017 7:01 pm
Excel Ver: 2010, 365
#6
Post
by March201711 » Thu Aug 30, 2018 9:06 pm
ลองทำแล้วค่ะ แต่ติดปัญหาการดึงเปิดfile ของ powerpoint อยากให้ดึงfileที่เก็บไว้ที่ drive c ชื่อ test2 ต้องปรับแก้ code vba อย่างไรคะ
You do not have the required permissions to view the files attached to this post.
snasui
Site Admin
Posts: 31257 Joined: Sun Jan 24, 2010 12:33 pm
Location: Songkhla, Thailand
Excel Ver: 2010, 2019
Contact:
#7
Post
by snasui » Thu Aug 30, 2018 9:33 pm
ตัวอย่างการปรับ Code ครับ
Code: Select all
'Other code
'If PowerPoint is not already open then open PowerPoint
If PowerPointApp Is Nothing Then Set PowerPointApp = CreateObject(class:="PowerPoint.Application")
myDestination = "C:\Test2.pptx"
Set myPresentation = PowerPointApp.Presentations.Open(myDestination)
'Handle if the PowerPoint Application is not found
If Err.Number = 429 Then
MsgBox "PowerPoint could not be found, aborting."
Exit Sub
End If
On Error GoTo 0
'Optimize Code
Application.ScreenUpdating = False
'Create a New Presentation
' Set myPresentation = PowerPointApp.Presentations.Add
'Add a slide to the Presentation
Set mySlide = myPresentation.Slides(1) '.Add(1, 11) '11 = ppLayoutTitleOnly
'Other code
March201711
Gold
Posts: 1047 Joined: Sat Mar 11, 2017 7:01 pm
Excel Ver: 2010, 365
#8
Post
by March201711 » Thu Aug 30, 2018 9:58 pm
ลองแล้วค่ะ ไม่ได้ มันเปิดเป็น powerpoint ให้ใหม่เลยค่ะ
ปล. ขอเปลี่ยนที่ย้ายเป็นที่ drive D นะค่ะ เพราะ drive cfileเยอะหาไม่เจอค่ะ
You do not have the required permissions to view the files attached to this post.
snasui
Site Admin
Posts: 31257 Joined: Sun Jan 24, 2010 12:33 pm
Location: Songkhla, Thailand
Excel Ver: 2010, 2019
Contact:
#9
Post
by snasui » Thu Aug 30, 2018 10:07 pm
Code ในไฟล์ล่าสุดไม่ตรงกับที่ผมแก้ไขไปให้ครับ
March201711
Gold
Posts: 1047 Joined: Sat Mar 11, 2017 7:01 pm
Excel Ver: 2010, 365
#10
Post
by March201711 » Thu Aug 30, 2018 10:22 pm
ได้แล้วค่ะ
แต่ถามนิดนึงค่ะ ถ้าจะให้ภาพที่นำมาวางใน powerpoint ให้พอดีกับทั้งขอบบนและล่าง ซ้ายและขวา ต้องปรับอย่างไรคะ
You do not have the required permissions to view the files attached to this post.
snasui
Site Admin
Posts: 31257 Joined: Sun Jan 24, 2010 12:33 pm
Location: Songkhla, Thailand
Excel Ver: 2010, 2019
Contact:
#11
Post
by snasui » Thu Aug 30, 2018 10:39 pm
กรุณาปรับมาเองก่อน ติดแล้วค่อยถามกันต่อครับ