+ Reply to Thread
Results 1 to 11 of 11

Compile error: User-defined type not defined

  1. #1
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Compile error: User-defined type not defined

    How to fix it?

    Thanks.

    Please Login or Register  to view this content.
    https://social.msdn.microsoft.com/Fo...forum=exceldev

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Compile error: User-defined type not defined

    .
    Try this :

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Re: Compile error: User-defined type not defined

    Quote Originally Posted by Logit View Post
    .
    Try this :
    Thanks. So I can change 1 to 15, which is every 15 minutes.

    But from the code, how can I know the unit is minute? How to change it to every 5 seconds?

    Thanks.

  4. #4
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Re: Compile error: User-defined type not defined

    Quote Originally Posted by Logit View Post
    .
    Try this :
    Sorry, I don't think the code works as I expect.

    I want to code keeps running, move cursor every X minutes, to avoid screen saver coming up.

    Your code is not recurring.

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Compile error: User-defined type not defined

    .
    The code works as desired. The movement of the cursor is very, very slight. Almost unnoticeable.

  6. #6
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Re: Compile error: User-defined type not defined

    Quote Originally Posted by Logit View Post
    .
    The code works as desired. The movement of the cursor is very, very slight. Almost unnoticeable.
    Thanks much!!!!

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Compile error: User-defined type not defined

    .
    You are welcome .

  8. #8
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Re: Compile error: User-defined type not defined

    Quote Originally Posted by Logit View Post
    .
    You are welcome .
    However, moving cursor does not prevent screen saver coming up, if the computer stays inactive for a certain period of time.

  9. #9
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Compile error: User-defined type not defined

    .
    Change the setting for allowing computer to "sleep" ?

  10. #10
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Re: Compile error: User-defined type not defined

    Quote Originally Posted by Logit View Post
    .
    Change the setting for allowing computer to "sleep" ?
    No, it is work laptop, not personal laptop. Have no permission to change setting.

  11. #11
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Compile error: User-defined type not defined

    .
    Well ... if you are gutsy enough to ignore company policy .... try this resource :

    https://www.codeproject.com/Articles...let-it-go-to-s

    and click on " Download Exe and checksums - 97.9 KB "


    I am certain there are other utilities out there that do the same thing ... search phrase: "vba change Windows sleep setting"

+ 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. Mac - Compile Error : User Defined type not defined
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2017, 05:02 AM
  2. Replies: 4
    Last Post: 06-28-2016, 05:38 PM
  3. Compile error: User- defined type not defined
    By rolex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2015, 05:08 PM
  4. Compile error: user defined type not defined
    By duhigs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2014, 07:51 PM
  5. [SOLVED] Compile error: User-defined type not defined
    By XmisterIS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2014, 09:46 AM
  6. compile error - user defined type not defined
    By TMP123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2010, 01:42 PM
  7. VB Compile Error - User-defined type not defined
    By dbwiz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2010, 04:31 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