+ Reply to Thread
Results 1 to 9 of 9

help with if and looping

  1. #1
    Registered User
    Join Date
    02-05-2014
    Location
    Malang
    MS-Off Ver
    Excel 2007
    Posts
    33

    help with if and looping

    hi everyone
    hi
    i have two workbook, one is named Database.xlsx and the other is a.xlsm
    i want to acces the data in Database.xlsx from a.xlsm with some condition
    if the condition meet then the value from data searching will fill cell M13 to M22 in the a.xlsm
    here is my code

    Please Login or Register  to view this content.
    thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: help with if and looping

    Hi uniks,

    It would be easier if you supplied the sample workbooks.

  3. #3
    Registered User
    Join Date
    02-05-2014
    Location
    Malang
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: help with if and looping

    here is my workbook
    sorry it took me so long to reply
    a.xlsm

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: help with if and looping

    We need the other workbook as well

  5. #5
    Registered User
    Join Date
    02-05-2014
    Location
    Malang
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: help with if and looping

    here is the other workbooks

    Database.xlsx

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: help with if and looping

    You are referring to sheets in the code that do not exist in the workbook.

  7. #7
    Registered User
    Join Date
    02-05-2014
    Location
    Malang
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: help with if and looping

    yes i have change it but it still didn't work

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: help with if and looping

    You need to set book1 as workbook, not workbooks

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-05-2014
    Location
    Malang
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: help with if and looping

    i tried,
    but it show error : "Compile error : Sub or function not defined"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA looping
    By bjcowen9000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2013, 06:43 PM
  2. Do Until Looping (not looping through all other columns)
    By orle8050 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-11-2013, 10:37 AM
  3. VBA help for looping
    By EXCELcior08 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-17-2010, 03:22 PM
  4. Is this possible without looping?
    By Frustrated1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2010, 09:55 AM
  5. Help with looping
    By dok112 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-01-2005, 01:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1